Third-party platform organization structure rapid synchronization method, device and equipment and medium

By establishing a mapping relationship between intermediate tables between third-party platforms and local systems, and by employing concurrency and batch processing technologies, the data synchronization problem between third-party platforms and local systems is solved, enabling accurate and timely organizational structure synchronization, and adapting to enterprise systems of different sizes.

CN121278024APending Publication Date: 2026-01-06厦门天锐科技股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511379883.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-25
Publication Date
2026-01-06

AI Technical Summary

Technical Problem

In existing technologies, organizational structure data between third-party platforms and enterprise local systems cannot be automatically linked, resulting in data silos, missing mapping relationships, poor real-time performance, difficulty in anomaly recovery, and limited scalability, leading to data inconsistency and duplication of work.

Method used

By leveraging the API interface of a third-party platform to retrieve organizational structure data, a mapping relationship between local tables and third-party tables is established using a pre-defined intermediate table. Concurrent and batch processing technologies, combined with asynchronous processing technologies, are employed to enable data addition, deletion, and modification operations, ensuring the accuracy and timeliness of synchronization.

Benefits of technology

It achieves accurate and timely synchronization of organizational structure data from third-party platforms, solving the problems of data inconsistency and duplication of work, improving synchronization efficiency and reliability, and adapting to enterprise systems of different sizes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121278024A_ABST
    Figure CN121278024A_ABST
Patent Text Reader

Abstract

The invention provides a rapid synchronization method and device for a third-party platform organization structure, equipment and a medium, and relates to the technical field of data synchronization. The method comprises the steps that organization structure data are pulled from a third-party platform by means of an API provided by the third-party platform, and the organization structure data comprise data of all departments and employees; storing the organizational structure data into a database according to a preset data structure, and establishing a mapping relation between a local table and a third-party table by utilizing a preset intermediate table; based on the intermediate table, performing comparative analysis on the organizational structure data pulled from the third-party platform and local organizational structure data, and finding out data items which need to be added, deleted and modified; and executing corresponding addition, deletion and modification operations on the local organizational structure data so as to synchronize the organizational structure data of the third-party platform to a local system. According to the method, the mapping relation between the local table and the third-party table is established through the intermediate table, and the problems of data inconsistency and repeated labor are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data synchronization technology, specifically to a method, apparatus, device, and medium for rapid synchronization of a third-party platform organizational structure. Background Technology

[0002] As enterprises deepen their IT infrastructure development, more and more companies are using third-party platforms (such as DingTalk and WeChat Work) for organizational structure management. However, the organizational structure data on these third-party platforms is often independent of the company's internal management system, leading to data inconsistencies and duplication of effort. Therefore, how to synchronize and bind organizational structure data from third-party platforms has become a major challenge in current enterprise IT infrastructure development.

[0003] Currently, when enterprises connect their organizational structures to third-party platforms such as DingTalk and WeChat Work, they generally adopt a manual input + manual adjustment model: staff first create accounts on the third-party platform, and then manually input the account information and corresponding organizational structure data such as department affiliation and personnel permissions into the enterprise's local management system; once the organizational structure of the third-party platform changes (such as employee onboarding / offboarding, department splitting / merging, job adjustments, etc.), it is necessary to manually adjust the corresponding data in the local system again to ensure that the organizational structure information on both ends is consistent.

[0004] The above solution has the following drawbacks:

[0005] (1) Data silo problem. There is no automatic connection mechanism between the third-party platform and the enterprise's local system. The organizational structure data of the two are independent and cannot be communicated. For example, after a third-party platform adds an employee, the employee's name, position, department and other information need to be manually re-entered into the local system. If the employee's position is changed later, it needs to be modified in both systems. This not only increases the workload, but also makes it easy for data inconsistency to occur due to operation omissions.

[0006] (2) Lack of mapping relationship. Existing synchronization tools do not have an "intermediate mapping layer," and enterprise local business tables (such as the t_local_user table storing employee information) are directly coupled with third-party platform data tables (such as DingTalk's employee table). Due to differences in data formats and field definitions between different platforms (e.g., DingTalk uses "userid" to identify employees, while WeChat Work uses "userid" but the field meanings are different), direct association is prone to problems such as field mismatch and data overwriting errors, resulting in a high data conflict rate.

[0007] (3) Poor real-time performance. Existing synchronization mechanisms mostly adopt the "full polling" mode—regardless of whether the data has changed, each synchronization requires the transmission of the entire organizational structure data from the third-party platform to the local system. For example, if a company has 10,000 employees, even if only one employee's information changes, 10,000 data entries still need to be transmitted. This method not only consumes a large amount of network bandwidth, but also results in long synchronization times due to the large amount of data transmission, failing to meet real-time requirements.

[0008] (4) Difficulty in recovering from anomalies. If an anomaly occurs during the synchronization process (such as network interruption or system failure), the existing solution lacks the ability to "resume interrupted transmission". Once interrupted, the previously synchronized data becomes invalid, and a full synchronization needs to be re-executed after recovery. For example, if the network disconnects when synchronization reaches 50%, 100% of the full data needs to be transmitted again after recovery, which not only wastes resources but may also cause new data problems due to repeated synchronization.

[0009] (5) Scalability limitations. Existing solutions mostly adopt a "single-threaded processing" architecture, meaning that only one piece of data or a set of data can be synchronized at a time. When the enterprise scales up (e.g., the number of employees exceeds 10,000) and needs to complete the organizational structure synchronization within a few minutes, the processing speed of a single thread is completely unable to meet the requirements. The synchronization time may extend from a few minutes to tens of minutes or even longer, seriously affecting the enterprise's management efficiency. Summary of the Invention

[0010] The purpose of this application is to provide a method, apparatus, electronic device, and storage medium for rapid synchronization of organizational structure data on a third-party platform, which can achieve accurate and timely synchronization of organizational structure data on a third-party platform.

[0011] In a first aspect, embodiments of this application provide a method for rapid synchronization of organizational structure on a third-party platform, including:

[0012] Using the API interface provided by the third-party platform, organizational structure data is retrieved from the third-party platform. The organizational structure data includes data on all departments and employees.

[0013] The organizational structure data is stored in the database according to the preset data structure, and a mapping relationship between the local table and the third-party table is established using a preset intermediate table; the local table is the table that stores the organizational structure data locally, and the third-party table is the table that stores the organizational structure data on a third-party platform.

[0014] Based on the intermediate table, the organizational structure data pulled from the third-party platform is compared and analyzed with the local organizational structure data to identify the data items that need to be added, deleted, or modified.

[0015] Based on the results of the comparative analysis, corresponding add, delete, and modify operations are performed on the local organizational structure data to synchronize the organizational structure data from the third-party platform to the local system.

[0016] In some embodiments of this application, the step of pulling organizational structure data from a third-party platform includes:

[0017] Organizational structure data was retrieved in batches from a third-party platform.

[0018] In some embodiments of this application, the intermediate table includes the following fields:

[0019] Data source identifier: Indicates the third-party platform providing the data;

[0020] Employee ID: Represents the employee's original unique key on the third-party platform;

[0021] Department identifier: Represents the original unique key of the department on the third-party platform;

[0022] Employee Details: Represents the employee's data stored according to a preset data structure;

[0023] Department Details: Represents the data stored by the department according to a preset data structure;

[0024] Employee Index: A unique index representing an employee on the same third-party platform;

[0025] Department Index: Represents a unique index for a department on the same third-party platform.

[0026] In some embodiments of this application, establishing the mapping relationship between the local table and the third-party table using a preset intermediate table includes:

[0027] Add data source identifier, employee identifier, and department identifier fields to the local table to establish a mapping relationship between the local table and the third-party table.

[0028] In some embodiments of this application, performing corresponding add, delete, or modify operations on the local organizational structure data based on the results of the comparative analysis includes:

[0029] Using concurrent and batch processing technologies, corresponding add, delete, and modify operations are performed on the local organizational structure data based on the results of comparative analysis.

[0030] In some embodiments of this application, the method further includes:

[0031] Record the synchronization time after synchronization is complete.

[0032] In some embodiments of this application, the method further includes:

[0033] By combining asynchronous processing techniques, each of the above steps can be treated as an independent asynchronous task.

[0034] Secondly, embodiments of this application provide a device for rapid synchronization of organizational structures on a third-party platform, comprising:

[0035] The pull module is used to pull organizational structure data from a third-party platform using the API interface provided by the third-party platform. The organizational structure data includes data on all departments and employees.

[0036] The mapping module is used to store the organizational structure data in the database according to a preset data structure, and to establish a mapping relationship between the local table and the third-party table using a preset intermediate table; the local table is the table that stores the organizational structure data locally, and the third-party table is the table that stores the organizational structure data on a third-party platform.

[0037] The comparison module is used to compare and analyze the organizational structure data pulled from the third-party platform with the local organizational structure data based on the intermediate table, and to identify the data items that need to be added, deleted, or modified.

[0038] The synchronization module is used to perform corresponding add, delete, and modify operations on the local organizational structure data based on the results of comparative analysis, so as to synchronize the organizational structure data of the third-party platform to the local system.

[0039] In some embodiments of this application, the pull module is specifically used for:

[0040] Organizational structure data was retrieved in batches from a third-party platform.

[0041] In some embodiments of this application, the intermediate table includes the following fields:

[0042] Data source identifier: Indicates the third-party platform providing the data;

[0043] Employee ID: Represents the employee's original unique key on the third-party platform;

[0044] Department identifier: Represents the original unique key of the department on the third-party platform;

[0045] Employee Details: Represents the employee's data stored according to a preset data structure;

[0046] Department Details: Represents the data stored by the department according to a preset data structure;

[0047] Employee Index: A unique index representing an employee on the same third-party platform;

[0048] Department Index: Represents a unique index for a department on the same third-party platform.

[0049] In some embodiments of this application, the mapping module is specifically used for:

[0050] Add data source identifier, employee identifier, and department identifier fields to the local table to establish a mapping relationship between the local table and the third-party table.

[0051] In some embodiments of this application, the synchronization module is specifically used for:

[0052] Using concurrent and batch processing technologies, corresponding add, delete, and modify operations are performed on the local organizational structure data based on the results of comparative analysis.

[0053] In some embodiments of this application, the apparatus further includes:

[0054] The time recording module is used to record the synchronization time of the data after synchronization is completed.

[0055] In some embodiments of this application, the apparatus further includes:

[0056] The asynchronous processing module is used to combine asynchronous processing technology to make each of the above steps an independent asynchronous task.

[0057] Thirdly, this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method as described in the first aspect.

[0058] Fourthly, this application provides a computer-readable storage medium having computer-readable instructions stored thereon, which can be executed by a processor to implement the method described in the first aspect.

[0059] Compared to existing technologies, the third-party platform organizational structure rapid synchronization method provided in this application utilizes the API interface provided by the third-party platform to pull organizational structure data from the platform. This organizational structure data includes data on all departments and employees. The data is then stored in a database according to a preset data structure. A mapping relationship is established between a local table and a third-party table using a preset intermediate table. The local table stores the organizational structure data locally, while the third-party table stores the organizational structure data on the third-party platform. Based on the intermediate table, the organizational structure data pulled from the third-party platform is compared and analyzed with the local organizational structure data to identify data items requiring add, delete, or modify operations. Based on the results of the comparison and analysis, the corresponding add, delete, or modify operations are performed on the local organizational structure data to synchronize the organizational structure data from the third-party platform to the local system. Compared to existing technologies, this application achieves accurate and timely synchronization of organizational structure data from third-party platforms and solves the problems of data inconsistency and redundant work by establishing a mapping relationship between the local and third-party tables through the intermediate table. Attached Figure Description

[0060] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0061] Figure 1 A flowchart illustrating a method for rapid synchronization of organizational structure on a third-party platform, as provided in an embodiment of this application, is shown.

[0062] Figure 2 This application provides a complete data synchronization flowchart according to an embodiment of the present application.

[0063] Figure 3 This invention provides a schematic diagram of the structure of a fast synchronization device for a third-party platform organizational structure according to an embodiment of this application.

[0064] Figure 4 A schematic diagram of an electronic device provided in an embodiment of this application is shown. Detailed Implementation

[0065] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0066] It should be noted that, unless otherwise stated, the technical or scientific terms used in this application shall have the ordinary meaning as understood by one of ordinary skill in the art to which this application pertains.

[0067] Furthermore, the terms "first" and "second," etc., are used to distinguish different objects, not to describe a specific order. Additionally, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to those processes, methods, products, or apparatuses.

[0068] Please refer to Figure 1 , Figure 1 This is a flowchart of a method for rapid synchronization of organizational structure on a third-party platform, provided in an embodiment of this application, including the following steps S101 to S104:

[0069] S101. Using the API interface provided by the third-party platform, retrieve organizational structure data from the third-party platform. The organizational structure data includes data on all departments and employees.

[0070] As enterprise informatization continues to deepen, more and more companies are starting to use third-party platforms (such as DingTalk and WeChat Work) for organizational structure management. This application relies on the official API interfaces provided by third-party platforms to selectively retrieve their full departmental and employee data. During the retrieval process, the data can be retrieved in batches according to the data volume to avoid network congestion or data parsing anomalies caused by excessive data volume in a single request, thus ensuring the integrity and stability of the source data acquisition.

[0071] S102. The organizational structure data is stored in the database according to the preset data structure, and a mapping relationship between the local table and the third-party table is established using the preset intermediate table; the local table is the table that stores the organizational structure data locally, and the third-party table is the table that stores the organizational structure data on the third-party platform.

[0072] Pre-build a local database and data structure (such as JSON) adapted to the organizational structure data, clarify the storage format and field rules of department and employee data, and ensure that it can handle data pulled by third parties; design and create "intermediate tables" (such as t_sync_user employee intermediate table and t_sync_dept department intermediate table) specifically for storing the relationship information between local tables and third-party tables, breaking down the barrier of direct coupling between the two and providing support for subsequent data mapping and relationship synchronization.

[0073] The intermediate table includes the following fields:

[0074] Data source identifier (source_id): Indicates the third-party platform providing the data; the source_id can be used to support DingTalk, WeChat Work, AD domains, etc., without having to create different tables for different platforms;

[0075] Employee ID (user_guid): Represents the original unique key of an employee on a third-party platform; Department ID (dept_guid): Represents the original unique key of a department on a third-party platform; user_guid / dept_guid store the original unique keys of each platform, naturally avoiding direct coupling with local business primary keys;

[0076] Employee details (user_detail): Represents employee data stored according to a preset data structure; Department details (dept_detail): Represents department data stored according to a preset data structure; The user_detail and dept_detail fields uniformly use JSON format, which can be extended to store differentiated attributes for any platform, and can be adapted to new platforms while keeping the table structure unchanged;

[0077] The employee index (uk_sync_user) represents a unique index for an employee on the same third-party platform; the department index (uk_sync_dept) represents a unique index for a department on the same third-party platform. The unique indexes uk_sync_user and uk_sync_dept ensure that the same platform object will not be stored repeatedly under the same source_id, naturally achieving "idempotent write".

[0078] Mapping establishment: Based on the created intermediate table, the unique identifier of the third-party data (such as user_guid, dept_guid) is bound to the primary key of the local table (such as user_id, dept_id), establishing a correspondence between the two and providing a precise matching basis for subsequent synchronization operations.

[0079] S103. Based on the intermediate table, compare and analyze the organizational structure data pulled from the third-party platform with the local organizational structure data to identify the data items that need to be added, deleted, or modified.

[0080] Comparison logic: The third-party data retrieved in step S101 is compared one by one with the organizational structure data already stored in the local system to identify data items that are "existing with the third party but not available locally" (need to be added), "not available with the third party but present locally" (need to be deleted), and "existing with both parties but with inconsistent information" (need to be modified).

[0081] S104. Based on the results of the comparative analysis, perform corresponding add, delete, and modify operations on the local organizational structure data to synchronize the organizational structure data of the third-party platform to the local system.

[0082] Data synchronization: For three types of discrepancies—"added, deleted, and modified" data—the corresponding operations are performed on the local system: adding third-party unique data, marking data that has been removed by the third party for deletion, and updating data with inconsistent information between the two parties, to ensure that local data is aligned with third-party data.

[0083] Specifically, the process for establishing and maintaining mapping relationships is as follows:

[0084] 1. Taking the local table t_local_user(user_id) as an example, add the fields user_guid and source_id;

[0085] 2. Comparison Logic: Filter the t_sync_user table by source_id to obtain the current synchronization batch, resulting in a List. <syncuser>.

[0086] 3. Update mapping:

[0087] Matched: No action required (or update the difference fields according to the field mapping relationship of the configuration table t_sync_source); Add: Add a user according to the field mapping relationship of the configuration table t_sync_source; Delete: If the user exists locally but no longer exists in the third party, perform a pseudo-deletion of the t_local_user business data and record it in the log.

[0088] Let's take DingTalk as an example. First, we retrieve data from all departments and employees using the API provided by DingTalk. Then, we prepare a database and data structure on the local system to store the organizational structure data, and design an intermediate table to store the relationship between the local table and the DingTalk table. Next, we compare and analyze the retrieved DingTalk data with the local data to identify data items that require add, delete, or modify operations, and establish a mapping relationship between the business table and the DingTalk table using the intermediate table. Finally, based on the results of the comparison and analysis, we execute the corresponding add, delete, and modify operations to synchronize the organizational structure data from the DingTalk platform to the local system. The intermediate table is used to synchronize and bind the business table and the DingTalk table, and it supports modifying the binding relationship.

[0089] In some embodiments of this application, step S104 can be specifically implemented as follows: using concurrent processing and batch processing techniques, performing corresponding add, delete, and modify operations on the local organizational structure data based on the results of comparative analysis.

[0090] In this embodiment, concurrent processing and batch processing techniques are employed to improve the efficiency of data synchronization. Any anomalies or failures that may occur during the synchronization process are recorded and handled. The concurrent / batch processing techniques are as follows:

[0091] 1. Concurrent fetching: Tasks are split according to t_sync_source.source_id, and different third-party platform APIs are called in parallel using a thread pool; each thread is further paginated by "department" to avoid blocking a single large department;

[0092] 2. Batch write: MyBatis-Plus's saveBatch() is used, and a commit is made every 1000 records; dept_detail / user_detail are large text fields, and batch insert...on duplicate key update is used separately to avoid row lock conflicts;

[0093] 3. Concurrent verification: Utilizes the hash value of dept_guid / user_guid for sharding, and performs multi-threaded parallel calculation of the MD5 digests of local and third-party data, completing the difference comparison of 100,000 nodes in seconds;

[0094] 4. Global Transactions: Uses SeataAT mode to ensure the atomicity of "write t_sync_user + write t_local_user" and supports cross-database transactions.

[0095] In some embodiments of this application, the above-mentioned method for rapid synchronization of third-party platform organizational structures further includes: recording the synchronization time of the data after synchronization is completed.

[0096] Specifically, a timestamp field can be added to record the data update time so that only data updated after the last synchronization is retrieved during the next synchronization.

[0097] In some embodiments of this application, the above-mentioned method for rapid synchronization of third-party platform organizational structures further includes: combining asynchronous processing technology to make each of the above steps an independent asynchronous task.

[0098] Specifically, scheduled tasks can be set up to trigger data synchronization operations. Combined with asynchronous processing techniques, steps such as fetching data, comparing data, performing CRUD operations, and binding relationships can be separated into asynchronous tasks.

[0099] Taking RocketMQ as an example, a single synchronization can be broken down into 5 sequential topics:

[0100] 1. PULL_TOPIC: Triggers the retrieval of the message body {sourceId, lastSyncTime};

[0101] 2.PARSE_TOPIC: Parse JSON→Generate SyncUserDTO / SyncDeptDTO;

[0102] 3. DIFF_TOPIC: Difference calculation → Output DiffCommand

[0103] (ADD / UPDATE / DELETE);

[0104] 4. SYNC_TOPIC: Executes database write → batch updates dsm_sync_user / dsm_sync_dept and local business tables;

[0105] 5. NOTIFY_TOPIC: Synchronization completion callback → refresh Redis cache, update dsm_sync_source.source_status=3; message key=sourceId+'_'+user_guid (or dept_guid), ensuring idempotency; after retrying 3 times for a failed message, it enters DLQ for manual intervention.

[0106] For ease of understanding, this application provides Figure 2 The complete data synchronization flowchart is shown below.

[0107] The functional and structural differences between this application and existing solutions are as follows:

[0108] 1. Mapping Mechanism: Existing solutions lack mapping relationships. This application solves the problem of direct coupling between local tables and third-party tables by establishing an intermediate table and mapping relationships. The intermediate table adopts a general data structure design, which can be adapted to different third-party platforms.

[0109] 2. Synchronization Mechanism: To address the poor real-time performance and scalability limitations of existing solutions, this application employs timestamp incremental synchronization and asynchronous processing, reducing redundant data transmission by more than 70%. This mechanism is compatible with various API interface specifications.

[0110] 3. Exception Handling: To address the difficulty of recovering from exceptions in existing solutions, this application establishes an exception logging mechanism to avoid full resynchronization. The exception handling module supports the identification of multiple error types.

[0111] 4. Architecture Design: Addressing the scalability limitations of existing solutions, this application employs concurrent / batch processing and asynchronous task decomposition, supporting minute-level synchronization for organizations with tens of thousands of users. This architecture is adaptable to enterprise systems of varying sizes.

[0112] 5. Association Mechanism: To address the data silo problem, this application achieves automatic association between systems through intermediate table binding operations. The binding mechanism adopts a universal identifier matching rule, compatible with data formats on multiple platforms.

[0113] 6. Platform compatibility: This application uses a standardized API interface to retrieve data, adopts a general data comparison algorithm, and uses platform-independent synchronization operations to ensure that the solution is applicable to mainstream third-party platforms such as DingTalk and WeChat Work.

[0114] The third-party platform organizational structure fast synchronization method provided in this application adopts timestamp incremental synchronization technology to reduce redundant data transmission. Combined with concurrent processing and batch processing methods, it supports efficient synchronization of large-scale organizational structures. An exception recording and recovery mechanism is established to avoid full resynchronization and improve the reliability and stability of synchronization.

[0115] In the above embodiments, a method for quickly synchronizing the organizational structure of a third-party platform is provided. Correspondingly, this application also provides a device for quickly synchronizing the organizational structure of a third-party platform. The device for quickly synchronizing the organizational structure of a third-party platform provided in this application can implement the above-described method for quickly synchronizing the organizational structure of a third-party platform. This device can be implemented through software, hardware, or a combination of both. For example, the device may include integrated or separate functional modules or units to perform the corresponding steps in the above methods.

[0116] Please refer to Figure 3 As shown, this application provides a third-party platform organizational structure fast synchronization device 10, comprising:

[0117] The pull module 101 is used to pull organizational structure data from the third-party platform using the API interface provided by the third-party platform. The organizational structure data includes data on all departments and employees.

[0118] The mapping module 102 is used to store the organizational structure data in the database according to a preset data structure, and to establish a mapping relationship between the local table and the third-party table using a preset intermediate table; the local table is a table that stores the organizational structure data locally, and the third-party table is a table that stores the organizational structure data on a third-party platform.

[0119] The comparison module 103 is used to compare and analyze the organizational structure data pulled from the third-party platform with the local organizational structure data based on the intermediate table, and to find the data items that need to be added, deleted or modified.

[0120] The synchronization module 104 is used to perform corresponding add, delete, and modify operations on the local organizational structure data based on the results of the comparative analysis, so as to synchronize the organizational structure data of the third-party platform to the local system.

[0121] In some embodiments of this application, the pull module 101 is specifically used for:

[0122] Organizational structure data was retrieved in batches from a third-party platform.

[0123] In some embodiments of this application, the intermediate table includes the following fields:

[0124] Data source identifier: Indicates the third-party platform providing the data;

[0125] Employee ID: Represents the employee's original unique key on the third-party platform;

[0126] Department identifier: Represents the original unique key of the department on the third-party platform;

[0127] Employee Details: Represents the employee's data stored according to a preset data structure;

[0128] Department Details: Represents the data stored by the department according to a preset data structure;

[0129] Employee Index: A unique index representing an employee on the same third-party platform;

[0130] Department Index: Represents a unique index for a department on the same third-party platform.

[0131] In some embodiments of this application, the mapping module 102 is specifically used for:

[0132] Add data source identifier, employee identifier, and department identifier fields to the local table to establish a mapping relationship between the local table and the third-party table.

[0133] In some embodiments of this application, the synchronization module 104 is specifically used for:

[0134] Using concurrent and batch processing technologies, corresponding add, delete, and modify operations are performed on the local organizational structure data based on the results of comparative analysis.

[0135] In some embodiments of this application, the apparatus further includes:

[0136] The time recording module is used to record the synchronization time of the data after synchronization is completed.

[0137] In some embodiments of this application, the apparatus further includes:

[0138] The asynchronous processing module is used to combine asynchronous processing technology to make each of the above steps an independent asynchronous task.

[0139] The third-party platform organizational structure fast synchronization device and the third-party platform organizational structure fast synchronization method provided in this application are based on the same inventive concept and have the same beneficial effects as the methods they adopt, operate or implement.

[0140] This application also provides an electronic device corresponding to the method provided in the foregoing embodiments. The electronic device may be an electronic device for a client, such as a mobile phone, laptop, tablet computer, desktop computer, etc., to execute the above-mentioned method for rapid synchronization of third-party platform organizational structure.

[0141] Please refer to Figure 4 This illustrates a schematic diagram of an electronic device provided by some embodiments of this application. For example... Figure 4 As shown, the electronic device 20 includes: a processor 200, a memory 201, a bus 202, and a communication interface 203. The processor 200, the communication interface 203, and the memory 201 are connected via the bus 202. The memory 201 stores a computer program that can run on the processor 200. When the processor 200 runs the computer program, it executes the third-party platform organizational structure fast synchronization method provided in any of the foregoing embodiments of this application.

[0142] The memory 201 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 203 (which can be wired or wireless), such as the Internet, wide area network, local area network, or metropolitan area network.

[0143] Bus 202 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. Memory 201 is used to store programs. After receiving execution instructions, processor 200 executes the programs. The fast synchronization method for third-party platform organizational structures disclosed in any of the foregoing embodiments of this application can be applied to processor 200, or implemented by processor 200.

[0144] The processor 200 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 200 or by instructions in software form. The processor 200 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 201. The processor 200 reads the information in memory 201 and, in conjunction with its hardware, completes the steps of the above method.

[0145] The electronic device provided in this application embodiment and the third-party platform organizational structure fast synchronization method provided in this application embodiment are based on the same inventive concept and have the same beneficial effects as the methods they adopt, operate or implement.

[0146] This application also provides a computer-readable storage medium corresponding to the fast synchronization method of third-party platform organizational structure provided in the foregoing embodiments, wherein a computer program (i.e., a program product) is stored thereon, and the computer program, when run by a processor, executes the fast synchronization method of third-party platform organizational structure provided in any of the foregoing embodiments.

[0147] It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical and magnetic storage media, which will not be elaborated here.

[0148] The computer-readable storage medium provided in the above embodiments of this application and the fast synchronization method of third-party platform organizational structure provided in the embodiments of this application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the applications stored therein.

[0149] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application, and they should all be covered within the scope of the claims and specification of this application.< / syncuser>

Claims

1. A third-party platform organization architecture quick synchronization method, characterized in that, The method comprises the following steps: pulling organization structure data from a third-party platform by using an API interface provided by the third-party platform, wherein the organization structure data comprises data of all departments and employees; storing the organization structure data into a database according to a preset data structure, and establishing a mapping relationship between a local table and a third-party table by using a preset intermediate table, wherein the local table is a table for locally storing organization structure data, and the third-party table is a table for storing organization structure data in the third-party platform; comparing and analyzing the organization structure data pulled from the third-party platform with local organization structure data based on the intermediate table, and finding out data items that need to be added, deleted or modified; performing corresponding adding, deleting or modifying operations on the local organization structure data according to the comparison and analysis result, so as to synchronize the organization structure data of the third-party platform to a local system.

2. The method of claim 1, wherein, The step of pulling the organization structure data from the third-party platform comprises the following steps: pulling the organization structure data from the third-party platform in batches.

3. The method of claim 1, wherein, The intermediate table comprises the following fields: data source identifier, indicating a third-party platform providing data; employee identifier, indicating an original unique key of an employee in the third-party platform; department identifier, indicating an original unique key of a department in the third-party platform; employee details, indicating data of an employee stored according to a preset data structure; department details, indicating data of a department stored according to a preset data structure; employee index, indicating a unique index of an employee in the same third-party platform; department index, indicating a unique index of a department in the same third-party platform.

4. The method of claim 3, wherein, The step of establishing the mapping relationship between the local table and the third-party table by using the preset intermediate table comprises the following steps: adding the data source identifier, the employee identifier and the department identifier of the intermediate table in the local table, so as to establish the mapping relationship between the local table and the third-party table.

5. The method of claim 1, wherein, The step of performing corresponding adding, deleting or modifying operations on the local organization structure data according to the comparison and analysis result comprises the following steps: adopting concurrent processing and batch processing technology to perform corresponding adding, deleting or modifying operations on the local organization structure data according to the comparison and analysis result.

6. The method of claim 1, wherein, The method further comprises the following steps: recording a synchronization time of data after synchronization is completed.

7. The method of claim 1, wherein, The method further comprises the following steps: combining an asynchronous processing technology to make the above steps independent as asynchronous tasks.

8. A third-party platform organization architecture quick synchronization apparatus, characterized in that, The method comprises the following steps: a pulling module, configured to pull organization structure data from a third-party platform by using an API interface provided by the third-party platform, wherein the organization structure data comprises data of all departments and employees; a mapping module, configured to store the organization structure data into a database according to a preset data structure, and establish a mapping relationship between a local table and a third-party table by using a preset intermediate table, wherein the local table is a table for locally storing organization structure data, and the third-party table is a table for storing organization structure data in the third-party platform; a comparison module, configured to compare and analyze the organization structure data pulled from the third-party platform with local organization structure data based on the intermediate table, and find out data items that need to be added, deleted or modified; a synchronization module, configured to perform corresponding adding, deleting or modifying operations on the local organization structure data according to the comparison and analysis result, so as to synchronize the organization structure data of the third-party platform to a local system.

9. An electronic device comprising: A memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that the processor, when running the computer program, implements the method of any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, A computer program product having stored thereon computer readable instructions executable by a processor to implement the method of any one of claims 1 to 7.