Search

CN-122001896-A - Data synchronous processing method and device and electronic equipment

CN122001896ACN 122001896 ACN122001896 ACN 122001896ACN-122001896-A

Abstract

The embodiment of the specification discloses a data synchronization processing method, a device and electronic equipment, and the embodiment of the invention can be applied to the field of computers, and the method comprises the steps of receiving a heartbeat request sent by a data synchronization application program at intervals of heartbeat, wherein the data synchronization application program is installed in an address book data server, and address book data of an object to be synchronized are stored in the address book data server; and returning a heartbeat request packet to the data synchronization application program, wherein the heartbeat request packet comprises a data import requirement so that the data synchronization application program can acquire address book data of an object to be synchronized from an address book data server according to the data import requirement, and receiving the address book data sent by the data synchronization application program, matching the address book data with local address book data, and updating and synchronizing the local address book data based on the address book data. By utilizing the technical scheme provided by the specification, the automatic synchronization of the data is realized, and the efficiency of the data synchronization processing is improved.

Inventors

  • ZHOU TINGTING
  • DENG LINSHENG
  • LI BIN

Assignees

  • 广州腾讯科技有限公司

Dates

Publication Date
20260508
Application Date
20241106

Claims (15)

  1. 1. A method for synchronously processing data, the method comprising: Receiving a heartbeat request sent by a data synchronization application program at intervals of heartbeat, wherein the data synchronization application program is installed in an address book data server, and address book data of an object to be synchronized are stored in the address book data server; A heartbeat request packet is returned to the data synchronization application program, wherein the heartbeat request packet comprises a data import requirement, so that the data synchronization application program acquires address book data of the object to be synchronized from the address book data server according to the data import requirement when the data import requirement is that data import is needed; And receiving address book data sent by the data synchronization application program, matching the address book data with local address book data, and updating and synchronizing the local address book data based on the address book data.
  2. 2. The method of claim 1, wherein the returning a heartbeat request packet to the data synchronization application comprises: acquiring a historical data import requirement and corresponding historical wrapping time in a historical heartbeat request wrapping returned to the data synchronization application program; Determining a current data synchronization requirement according to a preset data synchronization time interval, the historical data importing requirement, the historical wrapping time and the current time, wherein the preset data synchronization time interval comprises a change synchronization time interval and a direct synchronization time interval, and the data synchronization requirement comprises data synchronization and direct data synchronization when data synchronization is not performed and the change exists; Determining the data importing demand according to the current data synchronizing demand, wherein the data importing demand comprises data importing without data importing and directly importing data if the data importing is changed; And returning a heartbeat request packet back to the data synchronization application program based on the data import requirement.
  3. 3. The method of claim 2, wherein determining the current data synchronization requirement based on the preset data synchronization time interval, the historical data import requirement, the historical wrapping time, and the current time comprises: According to the historical data import demand, the historical wrapping time and the current time, calculating that the last data import demand is the direct import time interval between the historical wrapping time corresponding to the historical data import demand for directly importing data and the current time; judging whether a direct synchronization time interval is reached or not according to the preset data synchronization time interval and the direct import time interval, if the direct synchronization time interval is reached, the current data synchronization requirement is directly subjected to data synchronization, and if the direct synchronization time interval is not reached, calculating a change import time interval between a historical packet returning time corresponding to a historical data import requirement for carrying out data import when the latest data import requirement is changed and the current time according to the historical data import requirement, the historical packet returning time and the current time; Judging whether a change synchronization time interval is reached or not according to the preset data synchronization time interval and the change import time interval, if so, determining that the current data synchronization requirement is changed, and if not, determining that the current synchronization requirement is not data synchronization.
  4. 4. The method of claim 1, wherein the matching the address book data with local address book data, and updating and synchronizing the local address book data based on the address book data comprises: Matching the department identification in the local address book data with an address book data mapping table to obtain department data corresponding to the department identification in the matching as established mapping department data, wherein the address book data mapping table stores a mapping relation between the address book data and the local address book data; Acquiring department data with a mapping relation with the established mapping department data from the address book data according to the address book data mapping table to acquire target mapping department data; Inquiring the target mapping department data in the address book data, and updating and synchronizing the mapped established mapping department data according to the department name and the department path of the target mapping department data; If the target mapping department data is not queried in the address book data, deleting the non-queried target mapping department data and department identifiers of the corresponding established mapping department data from the address book data mapping table, and deleting the established mapping department data mapped by the non-queried target mapping department data from the local address book data.
  5. 5. The method of claim 4, wherein said matching said address book data with local address book data, said updating said local address book data based on said address book data further comprises: Taking department data in which the door identifier in the middle part of the local address book data is not matched with the address book data mapping table as unmapped department data; Matching the unmapped department data with department data in the address book data according to department names and department paths, taking unmapped department data in the matching as department data to be mapped, taking unmapped department data in the unmapped as department data to be processed, taking department data in the address book data matched with the unmapped department data as target department data to be mapped, and taking department data in the unmapped department data as target department data to be created; Storing the department identification of the target department data to be mapped and the department identification of the matched department data to be mapped into the address book data mapping table, and establishing a mapping relation between the target department data to be mapped and the matched department data to be mapped; deleting the to-be-processed department data from the local address book data; And creating local department data in the local address book data according to the department name and the department path of the target department data to be created, storing the department identification of the target department data to be created and the department identification of the created local department data into the address book data mapping table, and establishing a mapping relation between the target department data to be created and the created local department data.
  6. 6. The method of claim 1, wherein the matching the address book data with local address book data, the updating the local address book data based on the address book data further comprises: After the department data updating synchronization is finished, matching the user data under each department data in the local address book data with the address book data mapping table, and taking the matched user data as the established mapping user data; Matching user data under each department data in the address book data with the established mapping user data, taking the user data matched with the established mapping user data in the address book data as target mapping user data, and taking the user data not matched with the address book data in the established mapping user data as user data to be processed; updating and synchronizing the matched established mapping user data according to the target mapping user data; And deleting the mapping relation of the user data to be processed in the address book data mapping table from the local address book data.
  7. 7. The method of claim 6, wherein the matching the address book data with local address book data, the updating the local address book data based on the address book data further comprises: User data which are not matched with the address book data mapping table in the local address book data are used as unmapped user data; Matching the unmapped user data with the user data in the address book data, taking the unmapped user data in the matching as user data to be mapped, taking the user data in the address book data in the matching as target user data to be mapped, taking the unmapped user data in the unmapped as unmapped data to be changed, and taking the user data in the address book data in the unmapped as target newly-added user data; Storing the user data to be mapped and the matched target user data to be mapped into the address book data mapping table, and establishing a mapping relation between the user data to be mapped and the matched target user data to be mapped; adding the unmapped data to be changed to a candidate department, wherein the candidate department is used for storing user data which cannot be matched with the address book data; Inquiring corresponding target local department data in the local address book data according to the department data corresponding to the target newly-added user data in the address book data, and newly establishing corresponding user data under the target specimen local department data according to the target newly-added user data.
  8. 8. The method is applied to a data synchronization application program, wherein the data synchronization application program is installed in an address book data server, and address book data of an object to be synchronized are stored in the address book data server, and the method comprises the following steps: Sending a heartbeat request to a background system of the target application program of the object to be synchronized at intervals of heartbeat; Receiving a heartbeat request packet returned by a background system of the target application program, wherein the heartbeat request packet comprises a data import requirement; When the data import requirement is that data import is needed, address book data of the object to be synchronized are obtained from the address book data server according to the data import requirement, the address book data are sent to a background system of the target application program, so that the background system of the target application program matches the address book data with local address book data, and update synchronization is carried out on the local address book data based on a matching result.
  9. 9. The method according to claim 8, wherein the obtaining address book data of the object to be synchronized from the address book data server according to the data import requirement, and sending the address book data to the background system of the target application program, includes: when the data import requirement is changed, data import is carried out, and address book data of the currently stored object to be synchronized is obtained from the address book data server; and comparing the address book data acquired currently with the address book data which is transmitted to the background system of the target application program last time, if the address book data are changed, transmitting the address book data acquired currently to the background system of the target application program, and if the address book data are not changed, returning prompt information which does not need to be changed this time to the background system of the target application program.
  10. 10. The method according to claim 8, wherein the obtaining address book data of the object to be synchronized from the address book data server according to the data import requirement, and sending the address book data to the background system of the target application program, includes: when the data import requirement is that data import is directly carried out, acquiring address book data of the currently stored object to be synchronized from the address book data server; And sending the address book data acquired currently to a background system of the target application program.
  11. 11. The method of claim 8, wherein the data import requirement further comprises not importing data, the method further comprising: If the data import requirement is that data import is not performed, no operation is performed before the next heartbeat request is sent.
  12. 12. A data synchronization processing apparatus, the apparatus comprising: The heartbeat link module is used for receiving heartbeat requests sent by the data synchronization application program at intervals of heartbeat, the data synchronization application program is installed in an address book data server, and address book data of an object to be synchronized are stored in the address book data server; the heartbeat packet returning module is used for returning a heartbeat request packet to the data synchronization application program, wherein the heartbeat request packet comprises a data import requirement, so that the data synchronization application program acquires address book data of the object to be synchronized from the address book data server according to the data import requirement when the data import requirement is that the data import is needed; And the data synchronization module is used for receiving address book data sent by the data synchronization application program, matching the address book data with local address book data, and updating and synchronizing the local address book data based on a matching result.
  13. 13. A data synchronization processing apparatus, the apparatus being applied to a data synchronization application installed in an address book data server in which address book data of an object to be synchronized is stored, the apparatus comprising: The heartbeat request module is used for sending heartbeat requests to a background system of the target application program of the object to be synchronized at intervals of heartbeat; The heartbeat packet receiving module is used for receiving a heartbeat request packet returned by the background system of the target application program, wherein the heartbeat request packet comprises a data import requirement; And the data importing module is used for acquiring address book data of the object to be synchronized from the address book data server according to the data importing demand when the data importing demand is that the data importing is needed, sending the address book data to a background system of the target application program, so that the background system of the target application program matches the address book data with local address book data, and updating and synchronizing the local address book data based on a matching result.
  14. 14. An electronic device, comprising: A processor; a memory for storing the processor-executable instructions; Wherein the processor is configured to execute the instructions to implement the method of any of claims 1-11.
  15. 15. A computer readable storage medium, characterized in that instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method of any one of claims 1-11.

Description

Data synchronous processing method and device and electronic equipment Technical Field The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for data synchronization processing, and an electronic device. Background With the development of computer technology, more and more software is available for office, and during the operation of enterprises, different types of software systems, such as office automation systems (OA), customer relationship management systems (CRM), enterprise resource planning systems (ERP), enterprise instant messaging software (EIM), etc., are often required. Although these software are different, for use and communication of enterprise employees, address book data of the enterprise is generally stored based on the architecture of the enterprise. When the system of different providers is adopted, a set of software system for synchronizing account is needed for synchronizing address book data of enterprises, software used by switching is also needed due to business transition, and the account data is needed to be migrated and synchronized due to the fact that the business is expanded and the software with a specific single function is needed to be switched to comprehensive software. Generally, if account data, i.e., address book data, in software are to be synchronized, manual synchronization may be required, resulting in low data synchronization efficiency, or additional software development may be required, increasing the workload of data synchronization. Therefore, how to provide a data synchronization processing scheme, which improves the efficiency of data synchronization without additional development of software, is a technical problem to be solved in the art. Disclosure of Invention The embodiment of the specification provides a data synchronization processing method, a device, equipment, a storage medium and a computer program product, which improve the efficiency of data synchronization processing. In one aspect, an embodiment of the present disclosure provides a method for synchronously processing data, where the method includes: Receiving a heartbeat request sent by a data synchronization application program at intervals of heartbeat, wherein the data synchronization application program is installed in an address book data server, and address book data of an object to be synchronized are stored in the address book data server; A heartbeat request packet is returned to the data synchronization application program, wherein the heartbeat request packet comprises a data import requirement, so that the data synchronization application program acquires address book data of the object to be synchronized from the address book data server according to the data import requirement when the data import requirement is that data import is needed; And receiving address book data sent by the data synchronization application program, matching the address book data with local address book data, and updating and synchronizing the local address book data based on the address book data. On the other hand, an embodiment of the present disclosure provides a data synchronization processing method, where the method is applied to a data synchronization application, where the data synchronization application is installed in an address book data server, and address book data of an object to be synchronized is stored in the address book data server, and the method includes: Sending a heartbeat request to a background system of the target application program of the object to be synchronized at intervals of heartbeat; Receiving a heartbeat request packet returned by a background system of the target application program, wherein the heartbeat request packet comprises a data import requirement; When the data import requirement is that data import is needed, address book data of the object to be synchronized are obtained from the address book data server according to the data import requirement, the address book data are sent to a background system of the target application program, so that the background system of the target application program matches the address book data with local address book data, and update synchronization is carried out on the local address book data based on a matching result. In yet another aspect, embodiments of the present disclosure provide a data synchronization processing apparatus, including: The heartbeat link module is used for receiving heartbeat requests sent by the data synchronization application program at intervals of heartbeat, the data synchronization application program is installed in an address book data server, and address book data of an object to be synchronized are stored in the address book data server; the heartbeat packet returning module is used for returning a heartbeat request packet to the data synchronization application program, wherein the heartbeat request packet comprises a data im