Automatic synchronization method and system
Through automatic synchronization methods and systems, the OA server automatically synchronizes basic personnel information and position information to the AD domain server, solving the problem of manual maintenance of data synchronization between the OA system and the AD domain, improving data consistency and immediacy, and Realizes automated data management and self-healing capabilities.
Patent Information
- Application Number
- CN202410641162.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-22
- Publication Date
- 2024-09-06
AI Technical Summary
In the existing technology, data synchronization between the OA system and the AD domain requires manual maintenance, resulting in low data timeliness, increased labor costs, prone to errors, and difficulty in ensuring data security and consistency.
Provide an automatic synchronization method and system. The OA server encapsulates basic personnel information and position information into target data packets based on data synchronization requests, and transmits them to the AD domain server in an imperceptible manner. The AD domain server parses and organizes and generates organizational unit trees and Log files to achieve automatic data synchronization and historical tracing.
It improves the data consistency and immediacy between OA server and AD domain server, avoids delays and errors of manual synchronization, and realizes automatic management and self-healing capabilities of data.
Smart Images

Figure CN118606402A
Abstract
Description
Technical Field
[0001] The present application relates to the field of AD domain synchronization, and in particular to an automatic synchronization method and system. Background Art
[0002] In order to achieve continuous management of the company's overall business and maximize the synchronization of information such as personnel, organization, and equipment, companies usually transfer data from OA systems used for personnel management, process approval, collaboration, etc. to the AD (Active Directory) domain, and synchronize it from the AD domain to multiple devices connected to their own servers, thereby achieving batch synchronization and replacement of enterprise data.
[0003] However, since the OA system and AD domain have different design purposes, data structures, security requirements and update frequencies, the OA system and AD domain work independently of each other, and the data structures, security requirements and update frequencies are all different. For this reason, the information in the OA system is usually synchronized to the AD domain manually, and then the relevant organizational structure and permission policies are configured. The advantage of the traditional method is that it can flexibly control the time, scope and content of synchronization to avoid data conflicts and errors. The disadvantage is that it requires dedicated personnel to maintain it, which increases labor costs, the timeliness of data is not high, manual operations are prone to errors, the operation history is difficult to trace back, and data security and consistency are difficult to guarantee. Summary of the invention
[0004] In order to automatically and periodically transmit data in an OA server to an AD domain server, the present application provides an automatic synchronization method and system.
[0005] The present application provides an automatic synchronization method and system, which adopts the following technical solutions: An automatic synchronization method is used for an automatic synchronization system, wherein the automatic synchronization system includes an OA server and an AD domain server, and the method includes: The OA server encapsulates the basic information of the personnel and the position information of the personnel into a target data packet according to the data synchronization request; after verifying that the target data packet is valid, the pre-processed target data packet is transmitted as a transmission data packet to the AD domain server in an imperceptible manner; The AD domain server parses the transmission data packet to obtain a synchronization data packet, sorts the synchronization data packet according to the organizational basic information to obtain an organizational unit tree and generates a log file, and stores the synchronization data packet, the organizational unit tree and the log file; The data synchronization request is triggered according to a change in the basic information or position information of the personnel.
[0006] By adopting the above technical solution, the OA server triggers a data synchronization request when its own basic personnel information or personnel position information changes, and then encapsulates the basic personnel information and personnel position information into a target data packet according to the data synchronization request, and transmits it as a transmission data packet to the AD domain server in an imperceptible manner after verifying its validity; the AD domain server parses the transmission data packet, and obtains the unit organization tree in combination with the preset organizational basic information, generates a log file, and stores it. Among them, the organizational basic information mainly reflects the organizational structure of the enterprise, and the personnel position information in the synchronization data packet associates the basic personnel information with the enterprise organizational structure to obtain the organizational unit tree, and then the AD domain synchronizes the information to the office equipment of each sub-node according to the number of units of the organization. Improve the data consistency and immediacy between the OA server and the AD domain server, and avoid delays and errors in manual synchronization.
[0007] Optionally, the OA server encapsulates the basic information of the personnel and the position information of the personnel into a target data packet according to the data synchronization request, including: When the OA server detects that the data of the basic information of the personnel or the position information of the personnel has changed, the OA server generates the data synchronization request; According to the data synchronization request, the current personnel basic information and personnel position information are filled into a preset personnel basic-position corresponding table, and the personnel basic-position corresponding table is encapsulated as a target data packet.
[0008] By adopting the above technical solution, when the basic information or position information of a person changes, the OA server fills it into the basic personnel-position correspondence table, packages it, and automatically synchronizes it to the AD domain information.
[0009] Optionally, the change of the basic information or position information of the personnel includes: Add the basic information of the personnel or the position information of the personnel, change the basic information of the personnel or the position information of the personnel, or delete the basic information of the personnel or the position information of the personnel.
[0010] By adopting the above technical solution, the data change judgment criteria of personnel basic information and personnel position information include the number of additions, changes and deletions.
[0011] Optionally, after verifying that the target data packet is valid, transmitting the preprocessed target data packet as a transmission data packet to the AD domain server in an imperceptible manner, includes: Before encapsulating the basic information of personnel and the position information of personnel into a target data packet, the amount of verified valid data of all the basic information of personnel and the position information of personnel is calculated; After encapsulating the basic information of personnel and the position information of personnel into a target data packet, calculating the amount of real and effective data in all the target data packets; When the actual valid data volume is consistent with the verified valid data volume, the target data packet is verified to be valid; the verified valid target data packet is preprocessed to obtain a transmission data packet, and the transmission data packet is transmitted to the AD domain server through the RESTFUL data interface in an imperceptible manner.
[0012] By adopting the above technical solution, the data volume of personnel information and personnel position information is calculated to obtain the verified valid data volume before encapsulation, and the data volume of personnel information and personnel position information after encapsulation is calculated as the real valid data volume. The validity of the target data packet is verified based on whether the data volume before and after encapsulation is consistent, ensuring that the data volume remains unchanged during encapsulation. Subsequently, the data is transmitted to the AD server through the RESTFUL data interface in an imperceptible manner to achieve data synchronization. The imperceptible data transmission method is transmitted through the RESTFUL data interface, which meets the RESTFUL specification and can adapt to different data formats and standards.
[0013] Optionally, the preprocessing is to adjust the message format and encrypt the data of the target data packet to comply with preset calling specifications and security authentication specifications, and the parsing corresponds to the preprocessing.
[0014] By adopting the above technical solution, the calling specification and the security authentication specification are associated with the RESTFUL data interface, ensuring the feasibility of synchronizing data to the AD domain server.
[0015] Optionally, the basic personnel information includes name, gender, work number, telephone number, email address, employment status, joining time, and leaving time; the personnel position information includes position and organization information; the basic organization information includes organization code, company, person in charge, and superior department; the organization information corresponds one-to-one to the basic organization information.
[0016] By adopting the above technical solution, the one-to-one correspondence between basic personnel information and basic organizational information is conducive to establishing a tree-like structure diagram of the affiliated organizational information and the organizational basic information.
[0017] Optionally, arranging the synchronization data packets according to the organizational basic information to obtain an organizational unit tree and generate a log file includes: Generate a primary unit tree according to the basic organizational information; According to the correspondence principle between the organizational information and the organizational code, the basic personnel information in the synchronization data packet is associated with the primary unit tree to obtain an organizational unit tree; When the organizational unit tree changes, a log record is generated, and the log record is compressed into the log file at a preset period.
[0018] By adopting the above technical solution, the basic personnel information in the synchronization data package is updated to the primary unit tree to obtain the number of organizational units, and then the number of organizational units before and after the change is compared. When the comparison result shows that there is a change, a log record is generated and periodically compressed into a log file for storage, which is convenient for subsequent staff to trace the source.
[0019] Optionally, the method further includes: The AD domain server reads the corresponding target log file, the current log file and the current organizational unit tree according to the backtracking instruction; According to the target log file and the current log file, the current organization unit tree is restored to the target unit organization tree; and a restoration data packet is generated according to the target unit organization tree as a new synchronization data packet.
[0020] By adopting the above technical solution, the corresponding target log file is found according to the backtracking instruction, and then the current organization unit tree is adjusted as the target unit organization tree according to the comparison result between the current log file and the target log file, and then a recovery data packet is generated according to the target unit organization tree as a new synchronization data packet, thereby realizing the historical backtracking of the OA server.
[0021] Optionally, the method further includes: The AD domain server restarts according to the fault instruction from the back end, and generates a backtracking instruction pointing to the most recent log file after restarting.
[0022] By adopting the above technical solution, when a fault occurs in the backend, a fault instruction is generated and sent to the AD domain server. Subsequently, the AD domain server directly traces back the most recent log file to achieve data recovery when the backend fails.
[0023] The present invention provides an automatic synchronization system, comprising an OA server and an AD domain server, wherein the OA server comprises a signal receiving unit, an encapsulation unit, a verification unit, a preprocessing unit, and a first data transmission unit, and the AD domain server comprises a second data transmission unit, a parsing unit, a sorting unit, and a storage unit. The signal receiving unit is used to obtain a data synchronization request, wherein the data synchronization request is triggered according to a change in personnel basic information or personnel position information; The encapsulation unit is connected to the signal receiving unit and is used to encapsulate the basic personnel information and the personnel position information into a target data packet according to the data synchronization request; The verification unit is connected to the encapsulation unit, and is used to verify the target data packet, and generate a verification pass instruction after the target data packet is verified to be valid; The preprocessing unit is connected to the encapsulation unit and the verification unit respectively, and is used to preprocess the target data packet according to the verification pass instruction to generate a transmission data packet; The first data transmission unit is connected to the pre-processing unit, and is used to transmit the transmission data packet to the AD domain server in an imperceptible manner; The second data transmission unit is used to connect with the first data transmission unit to receive the transmission data packet, and the second data transmission unit is connected with the storage unit to receive the basic information of the organization and store it in the storage unit; The parsing unit is connected to the second data transmission unit and is used to parse the transmission data packet to obtain a synchronization data packet; The collating unit is connected to the parsing unit and the storage unit respectively, and is used to sort the synchronization data packet according to the organizational basic information to obtain an organizational unit tree and generate a log file, and store the synchronization data packet, organizational unit tree and log file in the storage unit.
[0024] By adopting the above technical solution, the OA server triggers a data synchronization request when its own basic personnel information or personnel position information changes, and then encapsulates the basic personnel information and personnel position information into a target data packet according to the data synchronization request, and transmits it as a transmission data packet to the AD domain server in an imperceptible manner after verifying its validity; the AD domain server parses the transmission data packet, and obtains the unit organization tree in combination with the preset organizational basic information, generates a log file, and stores it. Among them, the organizational basic information mainly reflects the organizational structure of the enterprise, and the personnel position information in the synchronization data packet associates the basic personnel information with the enterprise organizational structure to obtain the organizational unit tree, and then the AD domain synchronizes the information to the office equipment of each sub-node according to the number of units of the organization. Improve the data consistency and immediacy between the OA server and the AD domain server, and avoid delays and errors in manual synchronization.
[0025] In summary, the present application includes at least one of the following beneficial technical effects: 1. The OA server triggers a data synchronization request when its own basic personnel information or personnel position information changes, and then encapsulates the basic personnel information and personnel position information into a target data packet according to the data synchronization request. After verifying the validity, it is used as a transmission data packet and transmitted to the AD domain server in an imperceptible manner, ensuring data consistency and immediacy between the OA server and the AD domain server, avoiding delays and errors in manual synchronization, and the imperceptible data transmission method is transmitted through the RESTFUL data interface, which meets the RESTFUL specification and can adapt to different data formats and standards.
[0026] 2. The basic information of the organization mainly reflects the organizational structure of the enterprise. The basic information of the personnel positions in the synchronization data package is associated with the basic information of the personnel in the organizational structure of the enterprise to obtain the organizational unit tree, which is then used by the AD domain to synchronize information to the office equipment of each child node according to the number of units of the organization, thereby improving management efficiency.
[0027] 3. After each data synchronization is completed, a log record will be generated and compressed into a log file for subsequent tracing. In addition, when a failure occurs in the backend, the most recent log file will be automatically synchronized, which has a certain self-repair capability. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 is a flowchart of an automatic synchronization method provided by the first embodiment of the present invention; Figure 2 It is a module schematic diagram of an automatic synchronization system provided by the second embodiment of the present invention.
[0029] Description of reference numerals: 11. OA server; 111. Signal receiving unit; 112. Encapsulation unit; 113. Verification unit; 114. Preprocessing unit; 115. First data transmission unit; 12. AD domain server; 121. Second data transmission unit; 122. Parsing unit; 123. Sorting unit; 124. Storage unit; 125. Control unit; 100. Automatic synchronization system. DETAILED DESCRIPTION
[0030] The present application is further described in detail below in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0031] In the following description, for the purpose of explanation, many specific details are set forth in order to provide a thorough understanding of the inventive concept. As part of this specification, some of the drawings in the drawings of the present disclosure represent structures and devices in the form of block diagrams to avoid making the disclosed principles complicated and difficult to understand. For the sake of clarity, not all features of the actual implementation are necessarily described. References to "one specific implementation" or "specific implementations" in this disclosure mean that the specific features, structures, or characteristics described in conjunction with the specific implementation are included in at least one specific implementation, and multiple references to "one specific implementation" or "specific implementations" should not be understood as necessarily all referring to the same specific implementation.
[0032] Unless expressly limited, the terms "a", "an", and "the" are not intended to refer to a singular entity, but rather to include general categories of which specific examples may be used for illustration. Thus, the use of the terms "a" or "an" may mean any number of at least one, including "one", "one or more", "at least one", and "one or more than one". The term "or" means any of the alternatives and any combination of the alternatives, including all alternatives, unless the alternatives are expressly indicated to be mutually exclusive. The phrase "at least one of" when combined with a list of items refers to a single item in the list or any combination of the items in the list. The phrase does not require all of the listed items unless expressly limited to that.
[0033] First embodiment: The first embodiment of the present application provides an automatic synchronization method. The automatic synchronization method is applied to an automatic synchronization system, and the automatic synchronization system includes an OA server and an AD domain server. The automatic synchronization method includes: the OA server encapsulates personnel basic information and personnel position information into a target data packet according to a data synchronization request; after verifying that the target data packet is valid, the pre-processed target data packet is transmitted to the AD domain server as a transmission data packet in an imperceptible manner; the AD domain server parses the transmission data packet to obtain a synchronization data packet, organizes the synchronization data packet according to the organizational basic information to obtain an organizational unit tree and generates a log file, and stores the synchronization data packet, the organizational unit tree and the log file; wherein the data synchronization request is triggered according to changes in personnel basic information or personnel position information.
[0034] The OA server triggers a data synchronization request when its own basic personnel information or personnel position information changes. Then, according to the data synchronization request, the basic personnel information and personnel position information are encapsulated into a target data packet. After verifying the validity, it is used as a transmission data packet and transmitted to the AD domain server in an imperceptible manner. The AD domain server parses the transmission data packet, and combines the preset organizational basic information to obtain the unit organization tree, generate a log file, and store it. This improves the data consistency and immediacy between the OA server and the AD domain server, and avoids delays and errors in manual synchronization.
[0035] The following is a detailed description of the implementation details of an automatic synchronization method in this embodiment. The following content is only for the convenience of understanding the implementation details provided, and is not necessary for the implementation of this solution. The specific process of this embodiment is as follows Figure 1 As shown, the following steps are included: Step 101: The OA server triggers a data synchronization request based on changes in personnel basic information or personnel position information.
[0036] Specifically, the OA server will periodically detect whether there are changes in the basic information and position information of personnel. Any change will trigger a data synchronization request. Basic information of personnel includes name, gender, work number, telephone number, email address, employment status, time of joining, and time of leaving. Personnel position information includes position and organization information. For example, the basic information of personnel is "Li XX, female, 1-001, 188******42, 132*******@qq.com, resigned, March 20, 2012, June 1, 2015", and the position information of personnel is "Administrative Specialist, Administrative Department x". Usually, basic information of personnel corresponds to personnel position information. When an employee holds multiple positions at the same time, the basic information of the employee corresponds to multiple personnel position information. Staff can enter or delete new basic information of personnel through the OA system, and can also modify or add or delete the personnel position information corresponding to the basic information of an employee through the OA system.
[0037] In detail, changes to basic personnel information or personnel position information include: (1) adding the basic personnel information or the personnel position information; (2) changing the basic personnel information or the personnel position information; (3) deleting the basic personnel information or the personnel position information. The judgment criteria for data changes in basic personnel information and personnel position information include the number of additions, changes, and deletions.
[0038] Step 102: The OA server encapsulates the basic information of the personnel and the position information of the personnel into a target data packet according to the data synchronization request.
[0039] Specifically, after step 101 is triggered, that is, when the OA server detects that the data of the personnel basic information or the personnel position information has changed, it generates the data synchronization request and, according to the data synchronization request, fills the current personnel basic information and personnel position information into the preset personnel basic-position correspondence table, and encapsulates the personnel basic-position correspondence table as a target data packet.
[0040] In one example, after detecting a data synchronization request, the OA server fills all the changed basic information and position information of the personnel into the personnel basic-position correspondence table, and encapsulates the completed personnel basic-position correspondence table into a target data packet. That is, the target data packet represents the basic information and position information of the personnel in the OA server as a whole.
[0041] In another example, after detecting a data synchronization request, the OA server will put the personnel basic information and personnel position information that have changed into the personnel basic-position correspondence table, and encapsulate the completed personnel basic-position correspondence table into a target data packet. That is, the target data packet represents the personnel basic information and personnel position information that have changed in the OA server.
[0042] Step 103, after verifying that the target data packet is valid, the OA server transmits the pre-processed target data packet as a transmission data packet to the AD domain server in an imperceptible manner.
[0043] Specifically, step 103 includes: S3-1, verifying the validity of the target data packet generated in step 102; S3-2, preprocessing the target data packet after verification; S3-3, transmitting the preprocessed target data packet as a transmission data packet to the AD domain server in an imperceptible manner.
[0044] Among them, S3-1 verifies the validity of the target data packet, including: S3-1-1, before encapsulating the personnel basic information and the personnel position information into the target data packet, calculates the verification valid data volume of all the personnel basic information and the personnel position information; S3-1-2, after encapsulating the personnel basic information and the personnel position information into the target data packet, calculates the real valid data volume in all the target data packets; S3-1-3, when the real valid data volume is consistent with the verification valid data volume, verifies that the target data packet is valid; when the real valid data volume is consistent with the verification valid data volume, verifies that the target data packet is invalid, and the OA server issues an alarm prompt to remind the staff to check whether there is a failure in the encapsulation process of the target data packet in step 102.
[0045] In S3-2, the target data packet is preprocessed, including: preprocessing is to adjust the message format and encrypt the data of the target data packet to comply with the preset calling specification and security authentication specification. It is worth mentioning that the preprocessing process here is relative to the parsing process performed by the AD domain server after receiving the transmission data packet.
[0046] For S3-3, the preprocessed target data packet is transmitted as a transmission data packet to the AD domain server in an imperceptible manner, including: the transmission data packet is transmitted to the AD domain server through a RESTFUL data interface in an imperceptible manner.
[0047] In this example, the data volume of personnel information and personnel position information is calculated to obtain the verified valid data volume before encapsulation, and the data volume of personnel information and personnel position information after encapsulation is calculated as the real valid data volume, and the validity of the target data packet is verified based on whether the data volume before and after encapsulation is consistent, ensuring that the data volume remains unchanged during encapsulation, and then transmitted to the AD server through the RESTFUL data interface in an imperceptible manner to achieve data synchronization, and the imperceptible data transmission method is transmitted through the RESTFUL data interface, which meets the RESTFUL specification and can adapt to different data formats and standards. The calling specification and security authentication specification are associated with the RESTFUL data interface to ensure the feasibility of data synchronization to the AD domain server.
[0048] Step 104: The AD domain server parses the transmission data packet to obtain a synchronization data packet.
[0049] Specifically, after receiving the transmission data packet, the AD domain server uses the corresponding analysis method of the preprocessing in the OA system to parse the transmission data packet to obtain the synchronization data packet. In fact, the data content of the synchronization data packet should correspond to the target data packet.
[0050] Step 105: The AD domain server organizes the synchronization data packets according to the basic organization information to obtain an organizational unit tree and generates a log file, and stores the synchronization data packets, the organizational unit tree and the log file.
[0051] Specifically, in step 105, the synchronization data packets are sorted according to the organizational basic information to obtain an organizational unit tree and generate a log file, including: S5-1, generate a primary unit tree based on the basic information of the organization; S5-2, according to the correspondence principle between organizational information and organizational code, associate the basic personnel information in the synchronization data package with the primary unit tree to obtain the organizational unit tree; S5-3, generating log records when changes occur in the organizational unit tree, and compressing the log records into log files at a preset period.
[0052] The basic organization information is set by the staff in the AD domain server in advance. The basic organization information includes the organization code, the company to which it belongs, the person in charge, and the superior department. The organization information in the personnel position information can all correspond to one basic organization information. The primary unit tree generated by the basic organization information in S5-1 can be stored in advance and directly called when S5-1 comes, or it can be generated on-site. The primary unit tree only has a tree model of the organizational structure and is not associated with actual content. In S5-2, the basic personnel information A1 and the personnel position information A2 in the parsed synchronization data packet are separated. Each basic personnel information A1 corresponds to at least one personnel position information A2. According to the organization information in the personnel position information A2, the organization code in the corresponding basic organization information B is found, and the personnel position information A2 is associated with the basic organization information B, and then all the basic personnel information A1 corresponding to the personnel position information A2 are associated with the basic organization information B, and the primary unit tree is updated to obtain the organizational unit tree.
[0053] When the organizational unit tree in S5-3 changes, it includes: the organizational basic information B in the organizational unit tree adds personnel position information A2 and personnel basic information A1 for association, any one of the personnel position information A2 or personnel basic information A1 associated with the organizational basic information B in the organizational unit tree is modified, and the personnel position information A2 and personnel basic information A1 originally associated with the resistance basic information B in the organizational unit tree disappear. Update the personnel basic information in the synchronization data package to the primary unit tree to obtain the number of organizational units, and then compare the number of organizational units before and after the change. When the comparison result shows that there is a change, generate a log record and periodically compress it into a log file for storage, so that subsequent staff can trace the source.
[0054] Step 106, the AD domain server reads the corresponding target log file, the current log file and the current organizational unit tree according to the backtracking instruction; restores the current organizational unit tree to the target unit organizational tree according to the target log file and the current log file, and generates a restoration data packet as a new synchronization data packet according to the target unit organizational tree.
[0055] Specifically, when using an AD domain server, a user can generate a backtracking instruction, and then the AD domain server reads the target log file corresponding to the backtracking instruction from its own storage according to the backtracking instruction. Then the current log file and the target log file are compared, and the difference between the two is proposed. According to the comparison result between the current log file and the target log file, the current organization unit tree is adjusted as the target unit organization tree, and then a recovery data packet is generated according to the target unit organization tree as a new synchronization data packet, so as to realize the historical backtracking of the OA server.
[0056] Step 107: The AD domain server restarts according to the fault instruction from the backend, and generates a backtracking instruction pointing to the most recent log file after restarting.
[0057] Specifically, when a fault occurs in the backend, the backend generates a fault instruction and sends it to the AD domain server. The AD domain server restarts and generates a backtracking instruction for the most recent log file. The AD domain server finds the most recent log file as the target log file based on the backtracking instruction, adjusts the current organization unit tree as the target unit organization tree based on the comparison result between the current log file and the target log file, and then generates a recovery data packet as a new synchronization data packet based on the target unit organization tree, thereby realizing data recovery of the OA server when the backend fails.
[0058] The step division of the above-mentioned methods is only for the purpose of clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent. Adding insignificant modifications or introducing insignificant designs to the algorithm or process without changing the core design of the algorithm and process are all within the scope of protection of this patent.
[0059] Second implementation method: The second embodiment of the present invention provides an automatic synchronization system 100. Figure 2 As shown, the automatic synchronization system 100 includes an OA server 11 and an AD domain server 12, the OA server 11 includes a signal receiving unit 111, an encapsulation unit 112, a verification unit 113, a preprocessing unit 114, and a first data transmission unit 115, and the AD domain server 12 includes a second data transmission unit 121, a parsing unit 122, a sorting unit 123, a storage unit 124 and a control unit 125.
[0060] The signal receiving unit 111 is used to obtain a data synchronization request, wherein the data synchronization request is triggered according to a change in personnel basic information or personnel position information; the encapsulation unit 112 is connected to the signal receiving unit 111, and is used to encapsulate the personnel basic information and personnel position information into a target data packet according to the data synchronization request; the verification unit 113 is connected to the encapsulation unit 112, and is used to verify the target data packet, and generate a verification pass instruction after the target data packet is verified to be valid; the preprocessing unit 114 is respectively connected to the encapsulation unit 112 and the verification unit 113, and is used to preprocess the target data packet according to the verification pass instruction to generate a transmission data packet; the first data transmission unit 115 is connected to the preprocessing unit 114, and is used to transmit the transmission data packet to the AD domain server 12 in an imperceptible manner.
[0061] The second data transmission unit 121 is used to connect with the first data transmission unit 115 to receive the transmission data packet. The second data transmission unit 121 is connected with the storage unit 124 to receive the basic information of the organization and store it in the storage unit 124. The second data transmission unit 121 is also used to receive the back-tracing instruction from the user and the fault instruction from the back end. The control unit 125 is connected to the second data transmission unit 121, and is used to control the AD domain server to restart according to the fault instruction and generate a backtracking instruction pointing to the most recent log file after the restart; it is also used to read the corresponding target log file, the current log file and the current organization unit tree according to the backtracking instruction, restore the current organization unit tree to the target unit organization tree according to the target log file and the current log file, and generate a restoration data packet as a new synchronization data packet according to the target unit organization tree; The parsing unit 122 is connected to the second data transmission unit 121 and is used to parse the transmission data packet to obtain the synchronization data packet; The sorting unit 123 is connected to the parsing unit 122 , the control unit 125 and the storage unit 124 respectively, and is used to sort the synchronization data packet according to the organizational basic information to obtain the organizational unit tree and generate a log file, and store the synchronization data packet, the organizational unit tree and the log file in the storage unit 124 .
[0062] Other implementation details and working methods of the automatic synchronization system 100 disclosed in the present application are the same as or similar to the configurable rendering web page generation method described above, and are not described in detail here.
[0063] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.
Claims
1. An automatic synchronization method, used for an automatic synchronization system, wherein the automatic synchronization system includes an OA server and an AD domain server, characterized in that: The method comprises: The OA server encapsulates the basic information of the personnel and the position information of the personnel into a target data packet according to the data synchronization request; after verifying that the target data packet is valid, the pre-processed target data packet is transmitted as a transmission data packet to the AD domain server in an imperceptible manner; The AD domain server parses the transmission data packet to obtain a synchronization data packet, sorts the synchronization data packet according to the organizational basic information to obtain an organizational unit tree and generates a log file, and stores the synchronization data packet, the organizational unit tree and the log file; The data synchronization request is triggered according to a change in the basic information or position information of the personnel.
2. The automatic synchronization method according to claim 1, characterized in that: The OA server encapsulates the basic information of the personnel and the position information of the personnel into a target data packet according to the data synchronization request, including: When the OA server detects a change in the basic information or position information of the personnel, the OA server generates the data synchronization request; According to the data synchronization request, the current personnel basic information and personnel position information are filled into a preset personnel basic-position corresponding table, and the personnel basic-position corresponding table is encapsulated as a target data packet.
3. The automatic synchronization method according to claim 1 or 2, characterized in that: Changes to basic personnel information or personnel position information, including: Add the basic information of the personnel or the position information of the personnel, change the basic information of the personnel or the position information of the personnel, or delete the basic information of the personnel or the position information of the personnel.
4. The automatic synchronization method according to claim 2, characterized in that: After verifying that the target data packet is valid, transmitting the preprocessed target data packet as a transmission data packet to the AD domain server in an imperceptible manner, including: Before encapsulating the basic information of personnel and the position information of personnel into a target data packet, the amount of verified valid data of all the basic information of personnel and the position information of personnel is calculated; After encapsulating the basic information of personnel and the position information of personnel into a target data packet, calculating the amount of real and effective data in all the target data packets; When the actual valid data volume is consistent with the verified valid data volume, the target data packet is verified to be valid; the verified valid target data packet is preprocessed to obtain a transmission data packet, and the transmission data packet is transmitted to the AD domain server through the RESTFUL data interface in an imperceptible manner.
5. The automatic synchronization method according to claim 4, characterized in that: The preprocessing is to adjust the message format and encrypt the data of the target data packet to comply with the preset calling specification and security authentication specification, and the parsing corresponds to the preprocessing.
6. The automatic synchronization method according to claim 1, characterized in that: The basic personnel information includes name, gender, work number, telephone number, email address, employment status, joining time, and leaving time. The personnel position information includes position and organization information. The basic organization information includes organization code, company, person in charge, and superior department. The organization information corresponds one-to-one to the basic organization information.
7. The automatic synchronization method according to claim 6, characterized in that: The step of arranging the synchronization data packets according to the organizational basic information to obtain an organizational unit tree and generate a log file includes: Generate a primary unit tree according to the basic organizational information; According to the correspondence principle between the organizational information and the organizational code, the basic personnel information in the synchronization data packet is associated with the primary unit tree to obtain an organizational unit tree; When the organizational unit tree changes, a log record is generated, and the log record is compressed into the log file at a preset period.
8. The automatic synchronization method according to claim 1, characterized in that: The method further comprises: The AD domain server reads the corresponding target log file, the current log file and the current organizational unit tree according to the backtracking instruction; According to the target log file and the current log file, the current organization unit tree is restored to the target unit organization tree; and a restoration data packet is generated according to the target unit organization tree as a new synchronization data packet.
9. The automatic synchronization method according to claim 8, characterized in that: The method further comprises: The AD domain server restarts according to the fault instruction from the back end, and generates a backtracking instruction pointing to the most recent log file after restarting.
10. An automatic synchronization system, characterized in that: It includes an OA server and an AD domain server, wherein the OA server includes a signal receiving unit, an encapsulation unit, a verification unit, a preprocessing unit, and a first data transmission unit, and the AD domain server includes a second data transmission unit, a parsing unit, a sorting unit, and a storage unit. The signal receiving unit is used to obtain a data synchronization request, wherein the data synchronization request is triggered according to a change in personnel basic information or personnel position information; The encapsulation unit is connected to the signal receiving unit, and is used to encapsulate the basic personnel information and the personnel position information into a target data packet according to the data synchronization request; The verification unit is connected to the encapsulation unit, and is used to verify the target data packet, and generate a verification pass instruction after the target data packet is verified to be valid; The preprocessing unit is connected to the encapsulation unit and the verification unit respectively, and is used to preprocess the target data packet according to the verification pass instruction to generate a transmission data packet; The first data transmission unit is connected to the pre-processing unit, and is used to transmit the transmission data packet to the AD domain server in an imperceptible manner; The second data transmission unit is used to connect with the first data transmission unit to receive the transmission data packet, and the second data transmission unit is connected with the storage unit to receive the basic information of the organization and store it in the storage unit; The parsing unit is connected to the second data transmission unit and is used to parse the transmission data packet to obtain a synchronization data packet; The collating unit is connected to the parsing unit and the storage unit respectively, and is used to sort the synchronization data packet according to the organizational basic information to obtain an organizational unit tree and generate a log file, and store the synchronization data packet, organizational unit tree and log file in the storage unit.
