WO2019157881A1 - 一种邮件同步方法、装置与计算机可读存储介质 - Google Patents

一种邮件同步方法、装置与计算机可读存储介质 Download PDF

Info

Publication number
WO2019157881A1
WO2019157881A1 PCT/CN2019/070305 CN2019070305W WO2019157881A1 WO 2019157881 A1 WO2019157881 A1 WO 2019157881A1 CN 2019070305 W CN2019070305 W CN 2019070305W WO 2019157881 A1 WO2019157881 A1 WO 2019157881A1
Authority
WO
WIPO (PCT)
Prior art keywords
mail
node system
check value
list
time range
Prior art date
Application number
PCT/CN2019/070305
Other languages
English (en)
French (fr)
Inventor
陈颖棠
谭振东
Original Assignee
论客科技(广州)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 论客科技(广州)有限公司 filed Critical 论客科技(广州)有限公司
Priority to US16/969,557 priority Critical patent/US11159616B2/en
Publication of WO2019157881A1 publication Critical patent/WO2019157881A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/42Mailbox-related aspects, e.g. synchronisation of mailboxes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/21Monitoring or handling of messages
    • H04L51/23Reliability checks, e.g. acknowledgments or fault reporting
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M13/00Coding, decoding or code conversion, for error detection or error correction; Coding theory basic assumptions; Coding bounds; Error probability evaluation methods; Channel models; Simulation or testing of codes
    • H03M13/03Error detection or forward error correction by redundancy in data representation, i.e. code words containing more digits than the source words
    • H03M13/05Error detection or forward error correction by redundancy in data representation, i.e. code words containing more digits than the source words using block codes, i.e. a predetermined number of check bits joined to a predetermined number of information bits
    • H03M13/09Error detection only, e.g. using cyclic redundancy check [CRC] codes or single parity bit
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/21Monitoring or handling of messages
    • H04L51/216Handling conversation history, e.g. grouping of messages in sessions or threads

Definitions

  • the present invention relates to the field of email service technologies, and in particular, to a mail synchronization method, apparatus, and computer readable storage medium.
  • Email is an important part of people's communication in their daily lives. E-mail is not just a simple message, it has become an indispensable communication tool like a phone. Email has been adopted as the standard for messaging because of its low cost, simplicity, ease of use, and global compatibility.
  • Some mail system servers use a dual-system hot standby solution to deploy two sets of mail systems: Mail system and mirroring system.
  • the mirroring system synchronizes the site structure, users, mail, and other data of the primary mail system in real time or at a fixed time.
  • the primary mail system maintains the same topology, site structure, and organization as the mirrored system.
  • the current method of mail synchronization is that the mirroring system divides the file into several small blocks (such as 512 bytes); the main mail system performs two kinds of verification for each divided data block: one is 32-bit.
  • Rolling weak check the other is 128-bit MD5 strong check; the mirror system will pass a checksum list of fileDst to the synchronization source; the synchronization source searches for all files of size 512 by searching for fileSrc. A block with the same weak check code and strong check code; the synchronization source finds the data in the two matching filesCrc and transmits it to the mirror system for synchronization.
  • the mail synchronization method has the following drawbacks: when the synchronization source synchronizes a large number of files, the comparison time is long, and when the synchronization source performs data comparison and synchronization, the file or directory is generally used as a unit, and if the mail system data needs to be synchronized, It is possible to perform all comparisons and incremental synchronizations with the entire set of mail system data.
  • the mail system has large data capacity and a large number of files, further increasing the time of comparison and synchronization, and cannot perform small-scale individual synchronization with users and time ranges. It is not possible to quickly synchronize the mail data of the specified user; the synchronization source can only perform one-way synchronization with the mirroring system.
  • the object of the present invention is to provide a mail synchronization method, device and computer readable storage medium, which can effectively shorten the time of mail comparison, realize small-scale mail data synchronization, improve the synchronization efficiency of mail data, and realize the master node system. Two-way synchronization with the mirror node system.
  • an embodiment of the present invention provides a mail synchronization method, including:
  • index data of the mail in the set time range of the master node system and the mirror node system respectively wherein the index data includes a mail identifier, a flag bit, a folder, and a receiving time;
  • the mail data of the master node system and the mirror node system within the set time range is synchronized.
  • the master node system and the mirror node system are synchronized in the set time range.
  • the mail data inside including:
  • the mail identifier, the flag bit, and the second mail index list in the first mail index list are The mail identifier and the flag bit are compared one by one, and a list of partial index attribute changes, a list of newly added mail identifiers of the master node system, a list of mail identifiers deleted by the master node system, and a list of newly added mail identifiers of the mirror points are obtained;
  • the mail data of the mirror node system within the set time range is synchronized to the master node system according to the newly added mail identifier list of the mirror point.
  • the list is changed according to the partial index attribute, the mail identifier list added by the master node system, and the mail identifier list deleted by the master node system, and the mail of the master node system in the set time range is
  • the data is synchronized to the mirror node system, and specifically includes:
  • the synchronizing the mail data of the mirror node system in the set time range to the master node system according to the newly added mail identifier list of the mirror point specifically:
  • the generating, according to the first mail index list, a check value of the master node system in the set time range specifically:
  • the generating according to the receiving time corresponding to any one of the emails in the first mail index list, the initial verification value corresponding to the any one of the emails, specifically:
  • the initial check value corresponding to the any one of the emails is generated according to the year of the receiving time corresponding to the any one of the emails;
  • the initial inspection value corresponding to the any one email is generated according to the year, month, and day of the receiving time corresponding to the any one of the emails;
  • the current check value corresponding to the mail in the set time range is calculated according to the current date, and the current check value corresponding to the mail in the set time range is updated to a preset first mapping table, specifically include:
  • the embodiment of the invention further provides a mail synchronization device, comprising:
  • the index data obtaining module is configured to respectively obtain index data of the mail of the master node system and the mirror node system in a set time range, wherein the index data includes a mail identifier, a flag bit, a folder, and a receiving time;
  • a first index list generating module configured to generate a first mail index list according to the index data of the mail in the set time range by the primary node system
  • a second index list generating module configured to generate a second mail index list according to the index data of the mail in the set time range by the mirror node system
  • a first check value generating module configured to generate, according to the first mail index list, a check value of the mail in the set time range of the master node system
  • a second check value generating module configured to generate, according to the second mail index list, a check value of the mail in the set time range of the mirror node system
  • a check value comparison module configured to compare a check value generated by the master node system with a check value generated by the mirror node system
  • a mail synchronization module configured to synchronize the master node system and the mirror node system within the set time range when a check value generated by the master node system is inconsistent with a check value generated by the mirror node system Mail data.
  • An embodiment of the present invention further provides a mail synchronization apparatus, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, where the processor implements the computer program Mail synchronization method.
  • the embodiment of the present invention further provides a computer readable storage medium, the computer readable storage medium comprising a stored computer program, wherein, when the computer program is running, controlling a device where the computer readable storage medium is located to execute the mail Synchronization method.
  • the mail synchronization method includes: respectively acquiring index data of a mail of a master node system and a mirror node system in a set time range, wherein The index data includes a mail identifier, a flag bit, a folder, and a receiving time; generating, according to the index data of the mail within the set time range, the first mail index list; according to the mirror node system Generating, by the index data of the mail, the second mail index list in the set time range; generating, according to the first mail index list, a check value of the mail in the set time range of the master node system; The second mail index list generates a check value of the mail in the set time range of the mirror node system; compares the check value generated by the master node system with the check value generated by the mirror node system; When the check value generated by the master node system is inconsistent with the check value generated by the mirror node system, the master node
  • the method can effectively shorten the time of mail comparison, realize small-scale mail data synchronization, improve the synchronization efficiency of mail data, and realize two-way synchronization between the master node system and the mirror node system.
  • the embodiment of the invention further provides a mail synchronization device and a computer readable storage medium,
  • FIG. 1 is a flowchart of a method for synchronizing mail according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a mail synchronization apparatus according to an embodiment of the present invention.
  • FIG. 1 is a flowchart of a method for synchronizing mail according to an embodiment of the present invention.
  • the method for synchronizing mail includes:
  • index data of the mail in the set time range of the master node system and the mirror node system respectively where the index data includes a mail identifier, a flag bit, a folder, and a receiving time;
  • S200 Generate a first mail index list according to the index data of the mail in the set time range by the primary node system
  • S300 Generate a second mail index list according to the index data of the mail in the set time range by the mirror node system
  • S400 Generate, according to the first mail index list, a check value of the mail in the set time range of the primary node system;
  • S500 Generate, according to the second mail index list, a check value of the mail in the set time range of the mirror node system
  • S700 Synchronize the mail data of the master node system and the mirror node system within the set time range when the check value generated by the master node system is inconsistent with the check value generated by the mirror node system.
  • the method directly generates the check value according to the index data, and the check value is only related to the number of mails. Regardless of the size of the mail, the purpose of quickly generating the check value can be achieved, and the content of the mail is not required to be checked, and the reduction is shortened. Compared with the time, it can effectively shorten the time of mail comparison, improve the synchronization efficiency of mail data, and realize the two-way synchronization between the master node system and the mirror node system.
  • the index data further includes an index modification time, a sender, a recipient, a subject, and a header Message-id.
  • the set time range is null
  • the index data of all mails of the primary node system and the mirror node system are respectively obtained, and the index data is sorted according to the index modification time.
  • the first mail index list is generated according to the mail identifier, the flag bit, the folder, and the receiving time in the index data of the mail in the set time range by the master node system; according to the mirror node system
  • the mail identifier, the flag bit, the folder, and the receiving time in the index data of the mail within the set time range generate a second mail index list.
  • the method for calculating the check value of the master node system in the set time range is the same as the check value of the mirror node system in the set time range. Therefore, the following is calculated.
  • the check value of the node system within the set time range is described.
  • S700 when the mail check value generated by the master node system is inconsistent with the mail check value generated by the mirror node system, the master node system and the mirror node system are synchronized.
  • the mail data in the set time range specifically includes:
  • the mail identifier, the flag bit, and the second mail index list in the first mail index list are The mail identifier and the flag bit are compared one by one, and a list of partial index attribute changes, a list of newly added mail identifiers of the master node system, a list of mail identifiers deleted by the master node system, and a list of newly added mail identifiers of the mirror points are obtained;
  • the mail data of the mirror node system within the set time range is synchronized to the master node system according to the newly added mail identifier list of the mirror point.
  • the list is changed according to the partial index attribute, a list of mail identifiers added by the master node system, and a mail identifier list deleted by the master node system, and the master node system is in the
  • the mail data in the set time range is synchronized to the mirror node system, and specifically includes:
  • the email deleted by the user when the user deletes an email, the email deleted by the user will be marked as a delayed deletion state in the primary node system. At this point, the user appears to have deleted the email, and the background will actually delete the email after a period of time, providing a data foundation for the two-way synchronization between the primary node system and the mirror node system.
  • the synchronizing the mail data of the mirror node system in the set time range to the master node system according to the newly added mail identifier list of the mirror point specifically:
  • the generating, by the first mail index list, the check value of the primary node system in the set time range specifically includes:
  • the verification value of the mirror node system in the set time range is calculated by using the same method as calculating the check value of the master node system in the set time range, and
  • the check value of the mirror node system in the set time range is updated to a preset second mapping table.
  • the preset first mapping table records the check value in the set time range, and may directly check the check value and the base of the preset first mapping table obtained according to the first mail index list.
  • the check values of the preset second mapping table obtained by the second mail index list are compared one by one.
  • the check value is generated based on the index data of each mail, and does not need to check the content of the mail, the content of the check can be greatly reduced, and the time for generating the check value is shortened, and the check value is only related to the number of mails, and The size of the message is irrelevant, and the purpose of quickly generating the comparison check value can be achieved.
  • the generating, according to the receiving time corresponding to any one of the emails in the first mail index list, the initial verification value corresponding to the any one of the emails specifically:
  • the initial check value corresponding to the any one of the emails is generated according to the year of the receiving time corresponding to the any one of the emails;
  • the initial inspection value corresponding to the any one email is generated according to the year, month, and day of the receiving time corresponding to the any one of the emails;
  • the current check value corresponding to the mail in the set time range is calculated according to the current date, and the current check value corresponding to the mail in the set time range is updated to a preset
  • the first mapping table specifically includes:
  • N is the preset year
  • the index value a i corresponding to the i-th month is automatically generated according to the number increment principle, and the initial value of a i is the difference between the year corresponding to the current date and the preset year; the index corresponding to the i-th day the value of b i generated automatically according to the principles number is incremented, the initial value of the maximum value of b i +1 a i a.
  • the mail data in the set time range is synchronized, for example, the set time range is the latest month. Then, the mail data of the latest month can be synchronized, the total amount of synchronous data can be reduced, the mail data synchronization of a small range can be realized, and the synchronization efficiency and speed can be ensured.
  • different time ranges can be set, thereby setting different synchronization strategies for different levels of user groups and improving the user experience.
  • the backend server can also synchronize historical mail data by time period.
  • the time granularity of the time range is larger (the year is the main), and the closer the time is, the smaller the statistical granularity of the time range (day-based).
  • the synchronization of the mail is associated with the use of the mail, and the rule that the closer the time is, the larger the change of the user's mail is. If the mail corresponding to the set time range changes, the mail data that needs to be synchronized is smaller. Avoid obtaining a large amount of mail data. By comparing the check values, when only some check values are inconsistent, only the mail data of the time range corresponding to the inconsistent check value needs to be synchronized, reducing the data transmission amount and comparison. The number of messages is more efficient.
  • FIG. 2 it is a schematic diagram of a mail synchronization apparatus according to an embodiment of the present invention.
  • the mail synchronization apparatus includes:
  • the index data obtaining module 1 is configured to respectively obtain index data of the mail of the master node system and the mirror node system in a set time range, where the index data includes a mail identifier, a flag bit, a folder, and a receiving time;
  • the first index list generating module 2 is configured to generate a first mail index list according to the index data of the mail in the set time range by the master node system;
  • a second index list generating module 3 configured to generate a second mail index list according to the index data of the mail in the set time range by the mirror node system;
  • the first check value generating module 4 is configured to generate, according to the first mail index list, a check value of the mail in the set time range of the master node system;
  • a second check value generating module 5 configured to generate, according to the second mail index list, a check value of the mail in the set time range of the mirror node system
  • a check value comparison module 6 for comparing a check value generated by the master node system with a check value generated by the mirror node system
  • a mail synchronization module 7 configured to synchronize the master node system and the mirror node system in the set time range when a check value generated by the master node system is inconsistent with a check value generated by the mirror node system Mail data inside.
  • the check value is directly generated according to the index data by the device, and the check value is only related to the number of mails. Regardless of the size of the mail, the purpose of quickly generating the check value can be achieved, and the content of the mail is not required to be checked, and the reduction is shortened. Compared with the time, it can effectively shorten the time of mail comparison, improve the synchronization efficiency of mail data, and realize the two-way synchronization between the master node system and the mirror node system.
  • the index data further includes an index modification time, a sender, a recipient, a subject, and a header Message-id.
  • the index data of all mails of the primary node system and the mirror node system are respectively obtained, and the index data is sorted according to the index modification time.
  • the first mail index list is generated according to the mail identifier, the flag bit, the folder, and the receiving time in the index data of the mail in the set time range by the master node system; according to the mirror node system
  • the mail identifier, the flag bit, the folder, and the receiving time in the index data of the mail within the set time range generate a second mail index list.
  • the first check value generating module and the second check value generating module have the same functional modules and units, and the implemented functions are also identical, that is, the second check value generating module has the same
  • the functional modules or units corresponding to the first check value generating module are respectively described. Therefore, the first check value generating module will be described below.
  • the mail synchronization module includes:
  • a mail data comparison unit configured to: when the mail check value generated by the master node system is inconsistent with the mail check value generated by the mirror node system, the mail identifier, the flag bit, and the The mail identifiers and flag bits in the second mail index list are compared one by one, and a list of partial index attribute changes, a list of mail IDs added by the master node system, a mail identifier list deleted by the master node system, and a new mirror point are added.
  • Mail identification list
  • a mirror node system synchronization unit configured to: according to the partial index attribute change list, the new node identifier list added by the master node system, and the mail identifier list deleted by the master node system, the master node system is in the set time range The mail data within is synchronized to the mirror node system;
  • the master node system synchronization unit is configured to synchronize the mail data of the mirror node system within the set time range to the master node system according to the newly added mail identifier list of the mirror point.
  • the mirror node system synchronization unit includes:
  • An attribute synchronization unit configured to update, according to the partial index attribute change list, the change content of the primary node system within the set time range to the mirror node system;
  • a new mail synchronization unit is configured to obtain, according to the newly added mail identifier list of the primary node system, a new mailing list marked by the primary node system as being not delayed in the set time range, and The mail data corresponding to the newly added mail list in the master node system is synchronized to the mirror node system;
  • Deleting a mail synchronization unit configured to obtain, according to the mail identifier list deleted by the primary node system, a deleted mail list marked as a delayed deletion state in the set time range, and deleting the mirror node system The mail data corresponding to the deleted mailing list.
  • the email deleted by the user when the user deletes an email, the email deleted by the user will be marked as a delayed deletion state in the primary node system. At this point, the user appears to have deleted the email, and the background will actually delete the email after a period of time, providing a data foundation for the two-way synchronization between the primary node system and the mirror node system.
  • the primary node system synchronization unit includes:
  • a system mail synchronization unit configured to acquire a system mailing list generated by the mirroring node system according to the newly added mailing list, and synchronize the mail data corresponding to the system mailing list in the mirror node system to The primary node system.
  • the verification value of the mirror node system in the set time range is calculated by using the same method as calculating the check value of the master node system in the set time range, and
  • the check value of the mirror node system in the set time range is updated to a preset second mapping table.
  • the preset first mapping table records the check value in the set time range, and may directly check the check value and the base of the preset first mapping table obtained according to the first mail index list.
  • the check values of the preset second mapping table obtained by the second mail index list are compared one by one.
  • the check value is generated based on the index data of each mail, and does not need to check the content of the mail, the content of the check can be greatly reduced, and the time for generating the check value is shortened, and the check value is only related to the number of mails, and The size of the message is irrelevant, and the purpose of quickly generating the comparison check value can be achieved.
  • the primary node initial check value generating unit is configured to: when the receiving time corresponding to the any one email is earlier than the preset year, according to any one of the emails The year of the receipt time generates an initial test value corresponding to any one of the emails;
  • the primary node initial check value generating unit is configured to generate the random according to the year, month, and day of the receiving time corresponding to the any one of the emails when the receiving time corresponding to the any one email is the same day
  • the initial test value wherein Y, M, and D are respectively the year, month, and day of the receiving time corresponding to the any one of the mails, and N is the preset year;
  • the primary node second check value generating unit is configured to calculate, according to the year corresponding to the current date and the preset year, from the preset year to the current The current test value corresponding to each year of the year corresponding to the date;
  • a second check value generating unit of the master node configured to calculate, according to the year, month, and the preset year corresponding to the current date, each month from the first month of the current date to the month corresponding to the current date Current check value corresponding to month;
  • a second check value generating unit of the master node configured to calculate, according to the year, month, day, and the preset year corresponding to the current date, each day corresponding to the first day of the month of the current date to the current date The current check value corresponding to one day;
  • a second check value generating unit of the master node configured to update the current check value corresponding to each year, the current check value corresponding to each month, and the current check value corresponding to each day to a pre-pre Set in the first mapping table.
  • N is the preset year
  • the check value corresponding to each month of the month corresponding to the date wherein y is the year corresponding to the current date, mi is the month corresponding to the i-th month of the year corresponding to the current date, and N is the preset Year
  • the index value ai corresponding to the i-th month is automatically generated according to the number incrementing principle, and the initial value of ai is the difference between the year corresponding to the current date and the preset year; the index value corresponding to the i-th day is bi It is automatically generated according to the number increment principle, and the initial value of bi is the maximum value of +1 of +1.
  • the mail data in the set time range is synchronized, for example, the set time range is the latest month. Then, the mail data of the latest month can be synchronized, the total amount of synchronous data can be reduced, the mail data synchronization of a small range can be realized, and the synchronization efficiency and speed can be ensured.
  • different time ranges can be set, thereby setting different synchronization strategies for different levels of user groups and improving the user experience.
  • the backend server can also synchronize historical mail data by time period.
  • the time granularity of the time range is larger (the year is the main), and the closer the time is, the smaller the statistical granularity of the time range (day-based).
  • the synchronization of the mail is associated with the use of the mail, and the rule that the closer the time is, the larger the change of the user's mail is. If the mail corresponding to the set time range changes, the mail data that needs to be synchronized is smaller. Avoid obtaining a large amount of mail data. By comparing the check values, when only some check values are inconsistent, only the mail data of the time range corresponding to the inconsistent check value needs to be synchronized, reducing the data transmission amount and comparison. The number of messages is more efficient.
  • An embodiment of the present invention further provides a mail synchronization apparatus, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, where the processor implements the computer program Mail synchronization method.
  • the computer program can be partitioned into one or more modules/units that are stored in the memory and executed by the processor to perform the present invention.
  • the one or more modules/units may be a series of computer program instruction segments capable of performing a particular function, the instruction segments being used to describe the execution of the computer program in the mail synchronization device.
  • the computer program may be divided into an index data obtaining module for respectively acquiring index data of a mail of a master node system and a mirror node system in a set time range, wherein the index data includes a mail identifier, a flag bit, a first index list generating module, configured to generate a first mail index list according to the index data of the mail in the set time range by the master node system; and a second index list generating module, configured to: And generating, by the mirror node system, the second mail index list according to the index data of the mail in the set time range; the first check value generating module, configured to generate, according to the first mail index list, the master node system a check value of the mail in the set time range; a second check value generating module, configured to generate, according to the second mail index list, a check value of the mail in the set time range of the mirror node system a check value comparison module, configured to compare a check value generated by the master node system with a check value generated by the mirror node
  • the mail synchronization device may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
  • the mail synchronization device may include, but is not limited to, a processor and a memory. It will be understood by those skilled in the art that the schematic diagram is only an example of a mail synchronization device, does not constitute a limitation of the mail synchronization device, may include more or less components than the illustration, or combine some components, or different.
  • the components, such as the mail synchronization device may also include input and output devices, network access devices, buses, and the like.
  • the so-called processor can be a central processing unit (CPU), or other general-purpose processor, digital signal processor (DSP), application specific integrated circuit (ASIC), ready-made Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.
  • the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, which is a control center of the mail synchronizing device, and connects various parts of the entire mail synchronizing device by using various interfaces and lines. .
  • the memory can be used to store the computer program and/or module, the processor implementing the mail by running or executing a computer program and/or module stored in the memory, and recalling data stored in the memory Synchronize the various functions of the device.
  • the memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored. Data created based on the use of the mobile phone (such as audio data, phone book, etc.).
  • the memory may include a high-speed random access memory, and may also include non-volatile memory such as a hard disk, a memory, a plug-in hard disk, a smart memory card (SMC), and a Secure Digital (SD) card.
  • non-volatile memory such as a hard disk, a memory, a plug-in hard disk, a smart memory card (SMC), and a Secure Digital (SD) card.
  • Flash Card at least one disk storage device, flash memory device, or other volatile solid-state storage device.
  • the module/unit integrated by the mail synchronization device can be stored in a computer readable storage medium if it is implemented in the form of a software functional unit and sold or used as a separate product. Based on such understanding, the present invention implements all or part of the processes in the foregoing embodiments, and may also be completed by a computer program to instruct related hardware.
  • the computer program may be stored in a computer readable storage medium. The steps of the various method embodiments described above may be implemented when the program is executed by the processor.
  • the computer program comprises computer program code, which may be in the form of source code, object code form, executable file or some intermediate form.
  • the computer readable medium may include any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM). , random access memory (RAM, Random Access Memory), electrical carrier signals, telecommunications signals, and software distribution media. It should be noted that the content contained in the computer readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in a jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, computer readable media Does not include electrical carrier signals and telecommunication signals.
  • the embodiment of the present invention further provides a computer readable storage medium, the computer readable storage medium comprising a stored computer program, wherein, when the computer program is running, controlling a device where the computer readable storage medium is located to execute the mail Synchronization method.
  • the mail synchronization method includes: respectively acquiring index data of a mail of a master node system and a mirror node system in a set time range, wherein The index data includes a mail identifier, a flag bit, a folder, and a receiving time; generating, according to the index data of the mail within the set time range, the first mail index list; according to the mirror node system Generating, by the index data of the mail, the second mail index list in the set time range; generating, according to the first mail index list, a check value of the mail in the set time range of the master node system; The second mail index list generates a check value of the mail in the set time range of the mirror node system; compares the check value generated by the master node system with the check value generated by the mirror node system; When the check value generated by the master node system is inconsistent with the check value generated by the mirror node system, the master node
  • the method can effectively shorten the time of mail comparison, realize small-scale mail data synchronization, improve the synchronization efficiency of mail data, and realize two-way synchronization between the master node system and the mirror node system.
  • the embodiment of the invention further provides a mail synchronization device and a computer readable storage medium.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Theoretical Computer Science (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明公开了一种邮件同步方法、装置与计算机可读存储介质,所述方法包括:分别获取主节点系统以及镜像节点系统在设定时间范围内邮件的索引数据并分别生成第一邮件索引列表、第二邮件索引列表;分别根据第一邮件索引列表、第二邮件索引列表生成主节点系统、镜像节点系统在所述设定时间范围内邮件的校验值;对比主节点系统生成的校验值以及镜像节点系统生成的检验值;当主节点系统生成的校验值与镜像节点系统生成的检验值不一致时,同步主节点系统与镜像节点系统在设定时间范围内的邮件数据。通过所述方法能够有效缩短邮件对比的时间,实现小范围的邮件数据同步,提高邮件数据的同步效率,同时可以实现主节点系统与镜像节点系统的双向同步。

Description

一种邮件同步方法、装置与计算机可读存储介质 技术领域
本发明涉及电子邮件服务技术领域,具体涉及一种邮件同步方法、装置与计算机可读存储介质。
背景技术
电子邮件是人们在日常生活中进行通信交流的一个重要组成部分。电子邮件不仅是简单的消息,它像电话一样已成为不可缺少的通信工具。电子邮件已因它的低成本、简单性、易用性和全球兼容性而被采用为消息传输的标准。
为了保证邮件服务器的高可用性与稳定性,减少因为计算机硬件故障或网络等原因导致不能访问邮件系统带来的损失,一些邮件系统服务器会采用双机热备方案,分别部署两套邮件系统:主邮件系统与镜像系统。镜像系统会实时或定时同步主邮件系统的站点结构、用户、邮件及其他数据,主邮件系统与镜像系统保持相同的拓扑结构、站点结构及企业组织。目前的邮件同步方式是:镜像系统会把文件平均切分成若干个小块(如512个字节);主邮件系统对每一个分割好的数据块执行两种校验:一种是32位的滚动弱校验,另一种是128位的MD5强校验;镜像系统会把fileDst的一个checksum列表传给同步源;同步源通过搜索文件fileSrc的所有大小为512的数据块,来寻找与文件的某一块有着相同的弱校验码和强校验码的数据块;同步源找出fileSrc相邻两次匹配中的那些数据,并传送到镜像系统进行同步。但是这种邮件同步方法存在如下缺陷:同步源在同步大量文件时,比对时间较长,且同步源进行数据比对及同步时,一般以文件或目录为单位,如果需要同步邮件系统数据,则可能会以整套邮件系统数据来进行全部比对及增量同步,邮件系统数据容量大并且文件数量较多,进一步增加比对及同步的时间,无法以用户及时间范围进行小范围的单独同步,无法快速同步指定用户的邮件数据;同步源只能进行有想镜像系统进行单向同步。
发明内容
本发明的目的是提供一种邮件同步方法、装置与计算机可读存储介质,能够限有效缩短邮件对比的时间,实现小范围的邮件数据同步,提高邮件数据的同步效率,同时可以实现主节点系统与镜像节点系统的双向同步。
为解决以上技术问题,本发明实施例提供一种邮件同步方法,包括:
分别获取主节点系统以及镜像节点系统在设定时间范围内邮件的索引数据,其中,所述索引数据包括邮件标识、标志位、文件夹以及收信时间;
根据所述主节点系统在所述设定时间范围内邮件的索引数据生成第一邮件索引列表;
根据所述镜像节点系统在所述设定时间范围内邮件的索引数据生成第二邮件索引列表;
根据所述第一邮件索引列表生成所述主节点系统在所述设定时间范围内邮件的校验值;
根据所述第二邮件索引列表生成所述镜像节点系统在所述设定时间范围内邮件的校验值;
对比所述主节点系统生成的校验值以及所述镜像节点系统生成的检验值;
当所述主节点系统生成的校验值与所述镜像节点系统生成的检验值不一致时,同步所述主节点系统与所述镜像节点系统在所述设定时间范围内的邮件数据。
优选地,所述当所述主节点系统生成的邮件校验值与所述镜像节点系统生成的邮件检验值不一致时,同步所述主节点系统与所述镜像节点系统在所述设定时间范围内的邮件数据,具体包括:
当所述主节点系统生成的邮件校验值与所述镜像节点系统生成的邮件检验值不一致时,将所述第一邮件索引列表中的邮件标识、标志位以及所述第二邮件索引列表中的邮件标识、标志位进行一一对比,获取部分索引属性变更的列表、主节点系统新增的邮件标识列表、主节点系统删除的邮件标识列表以及镜像点新增的邮件标识列表;
根据所述部分索引属性变更的列表、主节点系统新增的邮件标识列表以及主节点系统删除的邮件标识列表,将所述主节点系统在所述设定时间范围内的邮件数据同步到所述镜像节点系统;
根据镜像点新增的邮件标识列表,将所述镜像节点系统在所述设定时间范围内的邮件数据同步到所述主节点系统。
优选地,所述根据所述部分索引属性变更的列表、主节点系统新增的邮件标识列表以及主节点系统删除的邮件标识列表,将所述主节点系统在所述设定时间范围内的邮件数据同步到所述镜像节点系统,具体包括:
根据所述部分索引属性变更的列表,将所述主节点系统在所述设定时间范围内的变更内容更新到所述镜像节点系统;
根据所述主节点系统新增的邮件标识列表,获取所述主节点系统在所述设定时间范围内标记为非延迟删除状态的新增邮件列表,并将所述主节点系统中与所述新增邮件列表对应的邮件数据同步到所述镜像节点系统;
根据所述主节点系统删除的邮件标识列表,获取所述主节点系统在所述设定时间范围内标记为延迟删除状态的删除邮件列表,并删除所述镜像节点系统中与所述删除邮件列表对应 的邮件数据。
优选地,所述根据镜像点新增的邮件标识列表,将所述镜像节点系统在所述设定时间范围内的邮件数据同步到所述主节点系统,具体包括:
根据所述镜像点新增的邮件标识列表,获取由所述镜像节点系统生成的系统邮件列表,并将所述镜像节点系统中与系统邮件列表对应的邮件数据同步到所述主节点系统。
优选地,所述根据所述第一邮件索引列表生成所述主节点系统在所述设定时间范围内的校验值,具体包括:
根据所述第一邮件索引列表中任意一封邮件对应的邮件标识、标志位以及文件夹生成所述任意一封邮件对应的字符串;
根据所述任意一封邮件对应的字符串,通过CRC校验工具生成一个32bit的CRC值;
根据所述第一邮件索引列表中所述任意一封邮件对应的收信时间,生成所述任意一封邮件对应的初始检验值;
对所述任意一封邮件对应的CRC值以及所述初始校验值进行异或处理,得到所述任意一封邮件对应的当前校验值,并将所述任意一封邮件对应的当前校验值更新到预设的第一映射表中;
根据当前日期计算所述设定时间范围内邮件对应的当前检验值,并将所述设定时间范围内邮件对应的当前检验值更新到所述预设的第一映射表中。
优选地,所述根据所述第一邮件索引列表中所述任意一封邮件对应的收信时间,生成所述任意一封邮件对应的初始检验值,具体包括:
当所述任意一封邮件对应的收信时间早于预设的年份时,根据所述任意一封邮件对应的收信时间的年份生成所述任意一封邮件对应的初始检验值;
当所述任意一封邮件对应的收信时间为当天时,根据所述任意一封邮件对应的收信时间的年、月、日生成所述任意一封邮件对应的初始检验值;
当所述任意一封邮件对应的收信时间为当月时,根据P 1=Y-N+M+D-1计算所述任意一封邮件对应的初始检验值,其中,Y、M、D分别为所述任意一封邮件对应的收信时间的年份、月、日,N为所述预设的年份;
当所述任意一封邮件对应的收信时间为当年时,根据P 2=Y-N+M-1计算所述任意一封邮件对应的初始检验值,其中,Y、M分别为所述任意一封邮件对应的收信时间的年份、月,N为所述预设的年份;
当所述任意一封邮件对应的收信时间晚于所述预设的年份时,根据P 3=Y-N计算所述任意一封邮件对应的初始检验值,其中,Y为所述任意一封邮件对应的收信时间的年份,N为所 述预设的年份。
优选地,所述根据当前日期计算所述设定时间范围内邮件对应的当前检验值,并将所述设定时间范围内邮件对应的当前检验值更新到预设的第一映射表中,具体包括:
根据当前日期对应的年份以及所述预设的年份,计算从所述预设的年份到所述当前日期对应的年份的每一年对应的检验值;
根据当前日期对应的年份、月以及所述预设的年份,计算从所述当前日期的年份的第一个月到当前日期对应的月份的每一个月对应的校验值;
根据当前日期对应的年份、月、天以及所述预设的年份,计算从所述当前日期的月份的第一天到当前日期对应的天数的每一个天对应的校验值;
将所述每一年对应的检验值、所述每一个月对应的校验值以及所述每一个天对应的校验值更新到所述预设的第一映射表中。
本发明实施例还提供一种邮件同步装置,包括:
索引数据获取模块,用于分别获取主节点系统以及镜像节点系统在设定时间范围内邮件的索引数据,其中,所述索引数据包括邮件标识、标志位、文件夹以及收信时间;
第一索引列表生成模块,用于根据所述主节点系统在所述设定时间范围内邮件的索引数据生成第一邮件索引列表;
第二索引列表生成模块,用于根据所述镜像节点系统在所述设定时间范围内邮件的索引数据生成第二邮件索引列表;
第一校验值生成模块,用于根据所述第一邮件索引列表生成所述主节点系统在所述设定时间范围内邮件的校验值;
第二校验值生成模块,用于根据所述第二邮件索引列表生成所述镜像节点系统在所述设定时间范围内邮件的校验值;
校验值对比模块,用于对比所述主节点系统生成的校验值以及所述镜像节点系统生成的检验值;
邮件同步模块,用于当所述主节点系统生成的校验值与所述镜像节点系统生成的检验值不一致时,同步所述主节点系统与所述镜像节点系统在所述设定时间范围内的邮件数据。
本发明实施例还提供一种邮件同步装置,包括处理器、存储器以及存储在所述存储器中且被配置为由所述处理器执行的计算机程序,所述处理器执行所述计算机程序时实现上述的邮件同步方法。
本发明实施例还提供一种计算机可读存储介质,所述计算机可读存储介质包括存储的计算机程序,其中,在所述计算机程序运行时控制所述计算机可读存储介质所在设备执行上述 的邮件同步法。
相对于现有技术,本发明实施例提供的一种邮件同步方法的有益效果在于:所述邮件同步方法包括:分别获取主节点系统以及镜像节点系统在设定时间范围内邮件的索引数据,其中,所述索引数据包括邮件标识、标志位、文件夹以及收信时间;根据所述主节点系统在所述设定时间范围内邮件的索引数据生成第一邮件索引列表;根据所述镜像节点系统在所述设定时间范围内邮件的索引数据生成第二邮件索引列表;根据所述第一邮件索引列表生成所述主节点系统在所述设定时间范围内邮件的校验值;根据所述第二邮件索引列表生成所述镜像节点系统在所述设定时间范围内邮件的校验值;对比所述主节点系统生成的校验值以及所述镜像节点系统生成的检验值;当所述主节点系统生成的校验值与所述镜像节点系统生成的检验值不一致时,同步所述主节点系统与所述镜像节点系统在所述设定时间范围内的邮件数据。通过所述方法能够有效缩短邮件对比的时间,实现小范围的邮件数据同步,提高邮件数据的同步效率,同时可以实现主节点系统与镜像节点系统的双向同步。本发明实施例还提供一种邮件同步装置与计算机可读存储介质,
附图说明
图1是本发明实施例提供的一种邮件同步方法的流程图;
图2是本发明实施例提供的一种邮件同步装置的示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
请参阅图1,其是本发明实施例提供的一种邮件同步方法的流程图,所述邮件同步方法包括:
S100:分别获取主节点系统以及镜像节点系统在设定时间范围内邮件的索引数据,其中,所述索引数据包括邮件标识、标志位、文件夹以及收信时间;
S200:根据所述主节点系统在所述设定时间范围内邮件的索引数据生成第一邮件索引列表;
S300:根据所述镜像节点系统在所述设定时间范围内邮件的索引数据生成第二邮件索引列表;
S400:根据所述第一邮件索引列表生成所述主节点系统在所述设定时间范围内邮件的校验值;
S500:根据所述第二邮件索引列表生成所述镜像节点系统在所述设定时间范围内邮件的校验值;
S600:对比所述主节点系统生成的校验值以及所述镜像节点系统生成的检验值;
S700:当所述主节点系统生成的校验值与所述镜像节点系统生成的检验值不一致时,同步所述主节点系统与所述镜像节点系统在所述设定时间范围内的邮件数据。
通过所述方法直接根据索引数据生校验值,校验值只与邮件数量相关,与邮件大小无关,可以达到快速生成比对校验值的目的,同时比对时无需检查邮件内容,缩短减少对比时间,从而能够有效缩短邮件对比的时间,提高邮件数据的同步效率,同时可以实现主节点系统与镜像节点系统的双向同步。
其中,所述索引数据还包括索引修改时间、发信人、收信人、主题以及信头Message-id等。当所述设定的时间范围为空值时,分别获取主节点系统以及镜像节点系统所有邮件的索引数据,并按照索引修改时间对索引数据进行排序。具体地,根据所述主节点系统在所述设定时间范围内邮件的索引数据中的邮件标识、标志位、文件夹以及收信时间生成第一邮件索引列表;根据所述镜像节点系统在所述设定时间范围内邮件的索引数据中的邮件标识、标志位、文件夹以及收信时间生成第二邮件索引列表。其中,计算所述主节点系统在所述设定时间范围内的校验值的方法与计算所述镜像节点系统在所述设定时间范围内的校验值相同因此,下面以计算所述主节点系统在所述设定时间范围内的校验值为了进行说明。
在一种可选的实施例中,S700:当所述主节点系统生成的邮件校验值与所述镜像节点系统生成的邮件检验值不一致时,同步所述主节点系统与所述镜像节点系统在所述设定时间范围内的邮件数据,具体包括:
当所述主节点系统生成的邮件校验值与所述镜像节点系统生成的邮件检验值不一致时,将所述第一邮件索引列表中的邮件标识、标志位以及所述第二邮件索引列表中的邮件标识、标志位进行一一对比,获取部分索引属性变更的列表、主节点系统新增的邮件标识列表、主节点系统删除的邮件标识列表以及镜像点新增的邮件标识列表;
根据所述部分索引属性变更的列表、主节点系统新增的邮件标识列表以及主节点系统删除的邮件标识列表,将所述主节点系统在所述设定时间范围内的邮件数据同步到所述镜像节点系统;
根据镜像点新增的邮件标识列表,将所述镜像节点系统在所述设定时间范围内的邮件数据同步到所述主节点系统。
在一种可选的实施例中,所述根据所述部分索引属性变更的列表、主节点系统新增的邮件标识列表以及主节点系统删除的邮件标识列表,将所述主节点系统在所述设定时间范围内的邮件数据同步到所述镜像节点系统,具体包括:
根据所述部分索引属性变更的列表,将所述主节点系统在所述设定时间范围内的变更内容更新到所述镜像节点系统;
根据所述主节点系统新增的邮件标识列表,获取所述主节点系统在所述设定时间范围内标记为非延迟删除状态的新增邮件列表,并将所述主节点系统中与所述新增邮件列表对应的邮件数据同步到所述镜像节点系统;
根据所述主节点系统删除的邮件标识列表,获取所述主节点系统在所述设定时间范围内标记为延迟删除状态的删除邮件列表,并删除所述镜像节点系统中与所述删除邮件列表对应的邮件数据。
在本实施例中,当用户删除一封邮件时,将在所述主节点系统中对被用户删除的邮件标记为延迟删除状态。此时,在用户看来该邮件已经被删除,而后台会在一段时间后真正删除该邮件,为所述主节点系统与所述镜像节点系统双向同步提供数据基础。
在一种可选的实施例中,所述根据镜像点新增的邮件标识列表,将所述镜像节点系统在所述设定时间范围内的邮件数据同步到所述主节点系统,具体包括:
根据所述镜像点新增的邮件标识列表,获取由所述镜像节点系统生成的系统邮件列表,并将所述镜像节点系统中与系统邮件列表对应的邮件数据同步到所述主节点系统。
在一种可选的实施例中,所述根据所述第一邮件索引列表生成所述主节点系统在所述设定时间范围内的校验值,具体包括:
根据所述第一邮件索引列表中任意一封邮件对应的邮件标识、标志位以及文件夹生成所述任意一封邮件对应的字符串;
根据所述任意一封邮件对应的字符串通过CRC校验工具生成一个32bit的CRC值;
根据所述第一邮件索引列表中所述任意一封邮件对应的收信时间,生成所述任意一封邮件对应的初始检验值;
对所述任意一封邮件对应的CRC值以及所述初始校验值进行异或处理,得到所述任意一封邮件对应的当前校验值,并将所述任意一封邮件对应的当前校验值更新到预设的第一映射表中;
根据当前日期计算所述设定时间范围内邮件对应的当前检验值,并将所述设定时间范围内邮件对应的当前检验值更新到预设的第一映射表中。
在本实施中,采用与计算所述主节点系统在所述设定时间范围内的校验值相同的方法计 算所述镜像节点系统在所述设定时间范围内的校验值,并将所述镜像节点系统在所述设定时间范围内的校验值更新到预设的第二映射表中。所述预设的第一映射表记录了所述设定时间范围内的检验值,可以直接对根据所述第一邮件索引列表获得的所述预设的第一映射表的校验值与根据所述第二邮件索引列表获得的所述预设的第二映射表的校验值进行一一对比。由于校验值是根据每封邮件的索引数据产生的,并不需要检查邮件的内容,可以大大减少比对时检查的内容,缩短生成检验值的时间,校验值只与邮件数量相关,与邮件大小无关,可以达到快速生成比对校验值的目的。
在一种可选的实施例中,所述根据所述第一邮件索引列表中所述任意一封邮件对应的收信时间,生成所述任意一封邮件对应的初始检验值,具体包括:
当所述任意一封邮件对应的收信时间早于预设的年份时,根据所述任意一封邮件对应的收信时间的年份生成所述任意一封邮件对应的初始检验值;
当所述任意一封邮件对应的收信时间为当天时,根据所述任意一封邮件对应的收信时间的年、月、日生成所述任意一封邮件对应的初始检验值;
当所述任意一封邮件对应的收信时间为当月时,根据P 1=Y-N+M+D-1计算所述任意一封邮件对应的初始检验值,其中,Y、M、D分别为所述任意一封邮件对应的收信时间的年份、月、日,N为所述预设的年份;
当所述任意一封邮件对应的收信时间为当年时,根据P 2=Y-N+M-1计算所述任意一封邮件对应的初始检验值,其中,Y、M分别为所述任意一封邮件对应的收信时间的年份、月,N为所述预设的年份;
当所述任意一封邮件对应的收信时间晚于所述预设的年份时,根据P 3=Y-N计算所述任意一封邮件对应的初始检验值,其中,Y为所述任意一封邮件对应的收信时间的年份,N为所述预设的年份。
在一种可选的实施例中,所述根据当前日期计算所述设定时间范围内邮件对应的当前检验值,并将所述设定时间范围内邮件对应的当前检验值更新到预设的第一映射表中,具体包括:
根据当前日期对应的年份以及所述预设的年份,计算从所述预设的年份到所述当前日期对应的年份的每一年对应的当前检验值;
根据当前日期对应的年份、月以及所述预设的年份,计算从所述当前日期的年份的第一个月到当前日期对应的月份的每一个月对应的当前校验值;
根据当前日期对应的年份、月、天以及所述预设的年份,计算从所述当前日期的月份的第一天到当前日期对应的天数的每一个天对应的当前校验值;
将所述每一年对应的当前检验值、所述每一个月对应的当前校验值以及所述每一个天对应的当前校验值更新到预设的第一映射表中。
在本实施例中,通过P[y i]=y i-N分别计算从所述预设的年份到所述当前日期对应的年份的每一年对应的检验值,其中,y i为第i年对应的年份,N为所述预设的年份;通过P[y+(a i-u)]=y-N+m i-1分别计算从所述当前日期的年份的第一个月到当前日期对应的月份的每一个月对应的校验值;其中,y为所述当前日期对应的年份,m i为所述当前日期对应的年份中第i个月对应的月份,N为所述预设的年份,a i为第i个月对应的索引值;u为所述当前日期对应的年份与所述预设的年份的差值-1;通过P[y+m+(b i-v)]=y-N+m+d i-1计算从所述当前日期的月份的第一天到当前日期对应的天数的每一个天对应的校验值,其中,y、m分别为所述当前日期对应的年份、月,d i为所述当前日期的月份中第i天对应的天数,N为所述预设的年份,b i为第i天对应的索引值;v为所述当前日期对应的年份与所述预设的年份的差值-1。具体地,第i个月对应的索引值a i根据编号递增原则自动生成,a i的初始值为所述当前日期对应的年份与所述预设的年份的差值;第i天对应的索引值b i根据编号递增原则自动生成,b i的初始值为a i的最大值+1。
以预设的年份为2000年,当前日期为2017年9月30号为例进行说明,此时17≤a i≤25,26≤b i≤54;从所述预设的年份到所述当前日期对应的年份的每一年对应的检验值分别为:P[2000]=2000-2000=0,P[2001]=1,……P[2016]=16;从所述当前日期的年份的第一个月到当前日期对应的月份的每一个月对应的校验值分别为:P[2017+17-16=2018]=2017-2000+1-1=17,P[2019]=18,……P[2026]=25;从所述当前日期的月份的第一天到当前日期对应的天数的每一个天对应的校验值分别为:P[2017+9+26-25=2027]=2017-2000+9+1-1=26,P[2028]=27……P[2055]=55。
在本实施例中,通过对比设定的时间范围内邮件的校验值,当校验值不一致时,对设定的时间范围内邮件数据进行同步,例如,设定时间范围为最近一个月,则可以对最近一个月的邮件数据进行同步,可以减少同步数据总量,实现小范围的邮件数据同步,保证同步效率及速度。同时可以设定不同的时间范围,从而为不同等级的用户群体设置不同的同步策略,提高用户体验。后台服务器还可以分时间段来同步历史邮件数据。
从上面的计算所得的校验值来看,时间越往以前,时间范围的统计粒度越大(以年为主),时间越靠近现在,时间范围的统计粒度就越小(以天为主),将邮件的同步与邮件的使用相关联,符合时间越接近当前日期,用户邮件变化就越大的规则,如果设定时间范围对应的邮件有变化,则需要同步的邮件数据就越小,可以避免获取大量的邮件数据,通过对校验值进行比对,当只有部分校验值不一致时,只需要对不一致的校验值对应的时间范围的邮件数据进 行同步,减少数据传输量及比对邮件数量,同步效率更高。
请参阅图2,其是本发明实施例还提供一种邮件同步装置的示意图,所述邮件同步装置包括:
索引数据获取模块1,用于分别获取主节点系统以及镜像节点系统在设定时间范围内邮件的索引数据,其中,所述索引数据包括邮件标识、标志位、文件夹以及收信时间;
第一索引列表生成模块2,用于根据所述主节点系统在所述设定时间范围内邮件的索引数据生成第一邮件索引列表;
第二索引列表生成模块3,用于根据所述镜像节点系统在所述设定时间范围内邮件的索引数据生成第二邮件索引列表;
第一校验值生成模块4,用于根据所述第一邮件索引列表生成所述主节点系统在所述设定时间范围内邮件的校验值;
第二校验值生成模块5,用于根据所述第二邮件索引列表生成所述镜像节点系统在所述设定时间范围内邮件的校验值;
校验值对比模块6,用于对比所述主节点系统生成的校验值以及所述镜像节点系统生成的检验值;
邮件同步模块7,用于当所述主节点系统生成的校验值与所述镜像节点系统生成的检验值不一致时,同步所述主节点系统与所述镜像节点系统在所述设定时间范围内的邮件数据。
通过所述装置直接根据索引数据生校验值,校验值只与邮件数量相关,与邮件大小无关,可以达到快速生成比对校验值的目的,同时比对时无需检查邮件内容,缩短减少对比时间,从而能够有效缩短邮件对比的时间,提高邮件数据的同步效率,同时可以实现主节点系统与镜像节点系统的双向同步。
其中,所述索引数据还包括索引修改时间、发信人、收信人、主题以及信头Message-id等。当所述设定的时间范围为空值时,分别获取主节点系统以及镜像节点系统所有邮件的索引数据,并按照索引修改时间对索引数据进行排序。具体地,根据所述主节点系统在所述设定时间范围内邮件的索引数据中的邮件标识、标志位、文件夹以及收信时间生成第一邮件索引列表;根据所述镜像节点系统在所述设定时间范围内邮件的索引数据中的邮件标识、标志位、文件夹以及收信时间生成第二邮件索引列表。其中,所述第一校验值生成模块与所述第二校验值生成模块具有的功能模块以及单元完全相同,实现的功能也完全相同,即所述第二校验值生成模块具有与所述第一校验值生成模块一一对应的功能模块或单元,因此,下面以所述第一校验值生成模块进行说明。
在一种可选的实施例中,所述邮件同步模块包括:
邮件数据对比单元,用于当所述主节点系统生成的邮件校验值与所述镜像节点系统生成的邮件检验值不一致时,将所述第一邮件索引列表中的邮件标识、标志位以及所述第二邮件索引列表中的邮件标识、标志位进行一一对比,获取部分索引属性变更的列表、主节点系统新增的邮件标识列表、主节点系统删除的邮件标识列表以及镜像点新增的邮件标识列表;
镜像节点系统同步单元,用于根据所述部分索引属性变更的列表、主节点系统新增的邮件标识列表以及主节点系统删除的邮件标识列表,将所述主节点系统在所述设定时间范围内的邮件数据同步到所述镜像节点系统;
主节点系统同步单元,用于根据镜像点新增的邮件标识列表,将所述镜像节点系统在所述设定时间范围内的邮件数据同步到所述主节点系统。
在一种可选的实施例中,所述镜像节点系统同步单元包括:
属性同步单元,用于根据所述部分索引属性变更的列表,将所述主节点系统在所述设定时间范围内的变更内容更新到所述镜像节点系统;
新增邮件同步单元,用于根据所述主节点系统新增的邮件标识列表,获取所述主节点系统在所述设定时间范围内标记为非延迟删除状态的新增邮件列表,并将所述主节点系统中与所述新增邮件列表对应的邮件数据同步到所述镜像节点系统;
删除邮件同步单元,用于根据所述主节点系统删除的邮件标识列表,获取所述主节点系统在所述设定时间范围内标记为延迟删除状态的删除邮件列表,并删除所述镜像节点系统中与所述删除邮件列表对应的邮件数据。
在本实施例中,当用户删除一封邮件时,将在所述主节点系统中对被用户删除的邮件标记为延迟删除状态。此时,在用户看来该邮件已经被删除,而后台会在一段时间后真正删除该邮件,为所述主节点系统与所述镜像节点系统双向同步提供数据基础。
在一种可选的实施例中,所述主节点系统同步单元包括:
系统邮件同步单元,用于根据所述镜像点新增的邮件标识列表,获取由所述镜像节点系统生成的系统邮件列表,并将所述镜像节点系统中与系统邮件列表对应的邮件数据同步到所述主节点系统。
在本实施中,采用与计算所述主节点系统在所述设定时间范围内的校验值相同的方法计算所述镜像节点系统在所述设定时间范围内的校验值,并将所述镜像节点系统在所述设定时间范围内的校验值更新到预设的第二映射表中。所述预设的第一映射表记录了所述设定时间范围内的检验值,可以直接对根据所述第一邮件索引列表获得的所述预设的第一映射表的校验值与根据所述第二邮件索引列表获得的所述预设的第二映射表的校验值进行一一对比。由于校验值是根据每封邮件的索引数据产生的,并不需要检查邮件的内容,可以大大减少比对 时检查的内容,缩短生成检验值的时间,校验值只与邮件数量相关,与邮件大小无关,可以达到快速生成比对校验值的目的。
在一种可选的实施例中,所述主节点初始检验值生成单元,用于当所述任意一封邮件对应的收信时间早于预设的年份时,根据所述任意一封邮件对应的收信时间的年份生成所述任意一封邮件对应的初始检验值;
所述主节点初始检验值生成单元,用于当所述任意一封邮件对应的收信时间为当天时,根据所述任意一封邮件对应的收信时间的年、月、日生成所述任意一封邮件对应的初始检验值;
所述主节点初始检验值生成单元,用于当所述任意一封邮件对应的收信时间为当月时,根据P 1=Y-N+M+D-1计算所述任意一封邮件对应的初始检验值,其中,Y、M、D分别为所述任意一封邮件对应的收信时间的年份、月、日,N为所述预设的年份;
所述主节点初始检验值生成单元,用于当所述任意一封邮件对应的收信时间为当年时,根据P 2=Y-N+M-1计算所述任意一封邮件对应的初始检验值,其中,Y、M分别为所述任意一封邮件对应的收信时间的年份、月,N为所述预设的年份;
所述主节点初始检验值生成单元,用于当所述任意一封邮件对应的收信时间晚于所述预设的年份时,根据P 3=Y-N计算所述任意一封邮件对应的初始检验值,其中,Y为所述任意一封邮件对应的收信时间的年份,N为所述预设的年份。
在一种可选的实施例中,所述主节点第二校验值生成单元,用于根据当前日期对应的年份以及所述预设的年份,计算从所述预设的年份到所述当前日期对应的年份的每一年对应的当前检验值;
主节点第二校验值生成单元,用于根据当前日期对应的年份、月以及所述预设的年份,计算从所述当前日期的年份的第一个月到当前日期对应的月份的每一个月对应的当前校验值;
主节点第二校验值生成单元,用于根据当前日期对应的年份、月、天以及所述预设的年份,计算从所述当前日期的月份的第一天到当前日期对应的天数的每一个天对应的当前校验值;
主节点第二校验值生成单元,用于将所述每一年对应的当前检验值、所述每一个月对应的当前校验值以及所述每一个天对应的当前校验值更新到预设的第一映射表中。
在本实施例中,通过P[y i]=y i-N分别计算从所述预设的年份到所述当前日期对应的年份的每一年对应的检验值,其中,y i为第i年对应的年份,N为所述预设的年份;通过P[y+(a i-u)]=y-N+m i-1分别计算从所述当前日期的年份的第一个月到当前日期对应的月份的每一个月对应的校验值;其中,y为所述当前日期对应的年份,mi为所述当前日期对应的年份中 第i个月对应的月份,N为所述预设的年份,ai为第i个月对应的索引值;u为所述当前日期对应的年份与所述预设的年份的差值-1;通过P[y+m+(bi-v)]=y-N+m+di-1计算从所述当前日期的月份的第一天到当前日期对应的天数的每一个天对应的校验值,其中,y、m分别为所述当前日期对应的年份、月,di为所述当前日期的月份中第i天对应的天数,N为所述预设的年份,bi为第i天对应的索引值;v为所述当前日期对应的年份与所述预设的年份的差值-1。具体地,第i个月对应的索引值ai根据编号递增原则自动生成,ai的初始值为所述当前日期对应的年份与所述预设的年份的差值;第i天对应的索引值bi根据编号递增原则自动生成,bi的初始值为ai的最大值+1。
以预设的年份为2000年,当前日期为2017年9月30号为例进行说明,此时17≤ai≤25,26≤bi≤54;从所述预设的年份到所述当前日期对应的年份的每一年对应的检验值分别为:P[2000]=2000-2000=0,P[2001]=1,……P[2016]=16;从所述当前日期的年份的第一个月到当前日期对应的月份的每一个月对应的校验值分别为:P[2017+17-16=2018]=2017-2000+1-1=17,P[2019]=18,……P[2026]=25;从所述当前日期的月份的第一天到当前日期对应的天数的每一个天对应的校验值分别为:P[2017+9+26-25=2027]=2017-2000+9+1-1=26,P[2028]=27……P[2055]=55。
在本实施例中,通过对比设定的时间范围内邮件的校验值,当校验值不一致时,对设定的时间范围内邮件数据进行同步,例如,设定时间范围为最近一个月,则可以对最近一个月的邮件数据进行同步,可以减少同步数据总量,实现小范围的邮件数据同步,保证同步效率及速度。同时可以设定不同的时间范围,从而为不同等级的用户群体设置不同的同步策略,提高用户体验。后台服务器还可以分时间段来同步历史邮件数据。
从上面的计算所得的校验值来看,时间越往以前,时间范围的统计粒度越大(以年为主),时间越靠近现在,时间范围的统计粒度就越小(以天为主),将邮件的同步与邮件的使用相关联,符合时间越接近当前日期,用户邮件变化就越大的规则,如果设定时间范围对应的邮件有变化,则需要同步的邮件数据就越小,可以避免获取大量的邮件数据,通过对校验值进行比对,当只有部分校验值不一致时,只需要对不一致的校验值对应的时间范围的邮件数据进行同步,减少数据传输量及比对邮件数量,同步效率更高。
本发明实施例还提供一种邮件同步装置,包括处理器、存储器以及存储在所述存储器中且被配置为由所述处理器执行的计算机程序,所述处理器执行所述计算机程序时实现上述的邮件同步方法。
示例性的,所述计算机程序可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器中,并由所述处理器执行,以完成本发明。所述一个或多个模块/ 单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述所述计算机程序在所述邮件同步装置中的执行过程。例如,所述计算机程序可以被分割成索引数据获取模块,用于分别获取主节点系统以及镜像节点系统在设定时间范围内邮件的索引数据,其中,所述索引数据包括邮件标识、标志位、文件夹以及收信时间;第一索引列表生成模块,用于根据所述主节点系统在所述设定时间范围内邮件的索引数据生成第一邮件索引列表;第二索引列表生成模块,用于根据所述镜像节点系统在所述设定时间范围内邮件的索引数据生成第二邮件索引列表;第一校验值生成模块,用于根据所述第一邮件索引列表生成所述主节点系统在所述设定时间范围内邮件的校验值;第二校验值生成模块,用于根据所述第二邮件索引列表生成所述镜像节点系统在所述设定时间范围内邮件的校验值;校验值对比模块,用于对比所述主节点系统生成的校验值以及所述镜像节点系统生成的检验值;邮件同步模块,用于当所述主节点系统生成的校验值与所述镜像节点系统生成的检验值不一致时,同步所述主节点系统与所述镜像节点系统在所述设定时间范围内的邮件数据。
所述邮件同步装置可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述邮件同步装置可包括,但不仅限于,处理器、存储器。本领域技术人员可以理解,所述示意图仅仅是邮件同步装置的示例,并不构成对邮件同步装置的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述邮件同步装置还可以包括输入输出设备、网络接入设备、总线等。
所称处理器可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等,所述处理器是所述邮件同步装置的控制中心,利用各种接口和线路连接整个邮件同步装置的各个部分。
所述存储器可用于存储所述计算机程序和/或模块,所述处理器通过运行或执行存储在所述存储器内的计算机程序和/或模块,以及调用存储在存储器内的数据,实现所述邮件同步装置的各种功能。所述存储器可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器可以包括高速随机存取存储器,还可以包括非易失性存储器,例如硬盘、内存、插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)、 至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
其中,所述邮件同步装置集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括电载波信号和电信信号。
本发明实施例还提供一种计算机可读存储介质,所述计算机可读存储介质包括存储的计算机程序,其中,在所述计算机程序运行时控制所述计算机可读存储介质所在设备执行上述的邮件同步法。
相对于现有技术,本发明实施例提供的一种邮件同步方法的有益效果在于:所述邮件同步方法包括:分别获取主节点系统以及镜像节点系统在设定时间范围内邮件的索引数据,其中,所述索引数据包括邮件标识、标志位、文件夹以及收信时间;根据所述主节点系统在所述设定时间范围内邮件的索引数据生成第一邮件索引列表;根据所述镜像节点系统在所述设定时间范围内邮件的索引数据生成第二邮件索引列表;根据所述第一邮件索引列表生成所述主节点系统在所述设定时间范围内邮件的校验值;根据所述第二邮件索引列表生成所述镜像节点系统在所述设定时间范围内邮件的校验值;对比所述主节点系统生成的校验值以及所述镜像节点系统生成的检验值;当所述主节点系统生成的校验值与所述镜像节点系统生成的检验值不一致时,同步所述主节点系统与所述镜像节点系统在所述设定时间范围内的邮件数据。通过所述方法能够有效缩短邮件对比的时间,实现小范围的邮件数据同步,提高邮件数据的同步效率,同时可以实现主节点系统与镜像节点系统的双向同步。本发明实施例还提供一种邮件同步装置与计算机可读存储介质。
以上是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也视为本发明的保护范围。

Claims (10)

  1. 一种邮件同步方法,其特征在于,包括:
    分别获取主节点系统以及镜像节点系统在设定时间范围内邮件的索引数据,其中,所述索引数据包括邮件标识、标志位、文件夹以及收信时间;
    根据所述主节点系统在所述设定时间范围内邮件的索引数据生成第一邮件索引列表;
    根据所述镜像节点系统在所述设定时间范围内邮件的索引数据生成第二邮件索引列表;
    根据所述第一邮件索引列表生成所述主节点系统在所述设定时间范围内邮件的校验值;
    根据所述第二邮件索引列表生成所述镜像节点系统在所述设定时间范围内邮件的校验值;
    对比所述主节点系统生成的校验值以及所述镜像节点系统生成的检验值;
    当所述主节点系统生成的校验值与所述镜像节点系统生成的检验值不一致时,同步所述主节点系统与所述镜像节点系统在所述设定时间范围内的邮件数据。
  2. 如权利要求1所述的邮件同步方法,其特征在于,所述当所述主节点系统生成的邮件校验值与所述镜像节点系统生成的邮件检验值不一致时,同步所述主节点系统与所述镜像节点系统在所述设定时间范围内的邮件数据,具体包括:
    当所述主节点系统生成的邮件校验值与所述镜像节点系统生成的邮件检验值不一致时,将所述第一邮件索引列表中的邮件标识、标志位以及所述第二邮件索引列表中的邮件标识、标志位进行一一对比,获取部分索引属性变更的列表、主节点系统新增的邮件标识列表、主节点系统删除的邮件标识列表以及镜像点新增的邮件标识列表;
    根据所述部分索引属性变更的列表、主节点系统新增的邮件标识列表以及主节点系统删除的邮件标识列表,将所述主节点系统在所述设定时间范围内的邮件数据同步到所述镜像节点系统;
    根据镜像点新增的邮件标识列表,将所述镜像节点系统在所述设定时间范围内的邮件数据同步到所述主节点系统。
  3. 如权利要求2所述的邮件同步方法,其特征在于,所述根据所述部分索引属性变更的列表、主节点系统新增的邮件标识列表以及主节点系统删除的邮件标识列表,将所述主节点系统在所述设定时间范围内的邮件数据同步到所述镜像节点系统,具体包括:
    根据所述部分索引属性变更的列表,将所述主节点系统在所述设定时间范围内的变更内容更新到所述镜像节点系统;
    根据所述主节点系统新增的邮件标识列表,获取所述主节点系统在所述设定时间范围内 标记为非延迟删除状态的新增邮件列表,并将所述主节点系统中与所述新增邮件列表对应的邮件数据同步到所述镜像节点系统;
    根据所述主节点系统删除的邮件标识列表,获取所述主节点系统在所述设定时间范围内标记为延迟删除状态的删除邮件列表,并删除所述镜像节点系统中与所述删除邮件列表对应的邮件数据。
  4. 如权利要求2所述的邮件同步方法,其特征在于,所述根据镜像点新增的邮件标识列表,将所述镜像节点系统在所述设定时间范围内的邮件数据同步到所述主节点系统,具体包括:
    根据所述镜像点新增的邮件标识列表,获取由所述镜像节点系统生成的系统邮件列表,并将所述镜像节点系统中与系统邮件列表对应的邮件数据同步到所述主节点系统。
  5. 如权利要求1所述的邮件同步方法,其特征在于,所述根据所述第一邮件索引列表生成所述主节点系统在所述设定时间范围内的校验值,具体包括:
    根据所述第一邮件索引列表中任意一封邮件对应的邮件标识、标志位以及文件夹生成所述任意一封邮件对应的字符串;
    根据所述任意一封邮件对应的字符串,通过CRC校验工具生成一个32bit的CRC值;
    根据所述第一邮件索引列表中所述任意一封邮件对应的收信时间,生成所述任意一封邮件对应的初始检验值;
    对所述任意一封邮件对应的CRC值以及所述初始校验值进行异或处理,得到所述任意一封邮件对应的当前校验值,并将所述任意一封邮件对应的当前校验值更新到预设的第一映射表中;
    根据当前日期计算所述设定时间范围内邮件对应的当前检验值,并将所述设定时间范围内邮件对应的当前检验值更新到所述预设的第一映射表中。
  6. 如权利要求5所述的邮件同步方法,其特征在于,所述根据所述第一邮件索引列表中所述任意一封邮件对应的收信时间,生成所述任意一封邮件对应的初始检验值,具体包括:
    当所述任意一封邮件对应的收信时间早于预设的年份时,根据所述任意一封邮件对应的收信时间的年份生成所述任意一封邮件对应的初始检验值;
    当所述任意一封邮件对应的收信时间为当天时,根据所述任意一封邮件对应的收信时间的年、月、日生成所述任意一封邮件对应的初始检验值;
    当所述任意一封邮件对应的收信时间为当月时,根据P 1=Y-N+M+D-1计算所述任意一封邮件对应的初始检验值,其中,Y、M、D分别为所述任意一封邮件对应的收信时间的年份、月、日,N为所述预设的年份;
    当所述任意一封邮件对应的收信时间为当年时,根据P 2=Y-N+M-1计算所述任意一封邮件对应的初始检验值,其中,Y、M分别为所述任意一封邮件对应的收信时间的年份、月,N为所述预设的年份;
    当所述任意一封邮件对应的收信时间晚于所述预设的年份时,根据P 3=Y-N计算所述任意一封邮件对应的初始检验值,其中,Y为所述任意一封邮件对应的收信时间的年份,N为所述预设的年份。
  7. 如权利要求5所述的邮件同步方法,其特征在于,所述根据当前日期计算所述设定时间范围内邮件对应的当前检验值,并将所述设定时间范围内邮件对应的当前检验值更新到所述预设的第一映射表中,具体包括:
    根据当前日期对应的年份以及所述预设的年份,计算从所述预设的年份到所述当前日期对应的年份的每一年对应的当前检验值;
    根据当前日期对应的年份、月以及所述预设的年份,计算从所述当前日期的年份的第一个月到当前日期对应的月份的每一个月对应的当前校验值;
    根据当前日期对应的年份、月、天以及所述预设的年份,计算从所述当前日期的月份的第一天到当前日期对应的天数的每一个天对应的当前校验值;
    将所述每一年对应的当前检验值、所述每一个月对应的当前校验值以及所述每一个天对应的当前校验值更新到所述预设的第一映射表中。
  8. 一种邮件同步装置,其特征在于,包括:
    索引数据获取模块,用于分别获取主节点系统以及镜像节点系统在设定时间范围内邮件的索引数据,其中,所述索引数据包括邮件标识、标志位、文件夹以及收信时间;
    第一索引列表生成模块,用于根据所述主节点系统在所述设定时间范围内邮件的索引数据生成第一邮件索引列表;
    第二索引列表生成模块,用于根据所述镜像节点系统在所述设定时间范围内邮件的索引数据生成第二邮件索引列表;
    第一校验值生成模块,用于根据所述第一邮件索引列表生成所述主节点系统在所述设定时间范围内邮件的校验值;
    第二校验值生成模块,用于根据所述第二邮件索引列表生成所述镜像节点系统在所述设定时间范围内邮件的校验值;
    校验值对比模块,用于对比所述主节点系统生成的校验值以及所述镜像节点系统生成的检验值;
    邮件同步模块,用于当所述主节点系统生成的校验值与所述镜像节点系统生成的检验值不一致时,同步所述主节点系统与所述镜像节点系统在所述设定时间范围内的邮件数据。
  9. 一种邮件同步装置,其特征在于,包括处理器、存储器以及存储在所述存储器中且被配置为由所述处理器执行的计算机程序,所述处理器执行所述计算机程序时实现如权利要求1至7中任意一项所述的邮件同步方法。
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质包括存储的计算机程序,其中,在所述计算机程序运行时控制所述计算机可读存储介质所在设备执行如权利要求1至7中任意一项所述的邮件同步法。
PCT/CN2019/070305 2018-02-13 2019-01-03 一种邮件同步方法、装置与计算机可读存储介质 WO2019157881A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/969,557 US11159616B2 (en) 2018-02-13 2019-01-03 Email synchronization method and apparatus, and computer readable storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810147966.6A CN108418746B (zh) 2018-02-13 2018-02-13 一种邮件同步方法、装置与计算机可读存储介质
CN201810147966.6 2018-02-13

Publications (1)

Publication Number Publication Date
WO2019157881A1 true WO2019157881A1 (zh) 2019-08-22

Family

ID=63128652

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/070305 WO2019157881A1 (zh) 2018-02-13 2019-01-03 一种邮件同步方法、装置与计算机可读存储介质

Country Status (3)

Country Link
US (1) US11159616B2 (zh)
CN (1) CN108418746B (zh)
WO (1) WO2019157881A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108418746B (zh) * 2018-02-13 2020-06-12 论客科技(广州)有限公司 一种邮件同步方法、装置与计算机可读存储介质
CN114124925B (zh) * 2020-08-25 2023-05-12 华为技术有限公司 一种电子邮件的同步方法及电子设备
CN114531413B (zh) * 2020-10-30 2023-10-10 华为技术有限公司 电子设备及其邮件同步方法和可读介质
CN117651033B (zh) * 2024-01-30 2024-04-05 太平金融科技服务(上海)有限公司 一种邮件同步方法、装置、电子设备和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102291453A (zh) * 2011-08-09 2011-12-21 中兴通讯股份有限公司 一种数据同步的方法及装置
WO2013010414A1 (zh) * 2011-07-21 2013-01-24 腾讯科技(深圳)有限公司 构建索引的方法、检索方法、装置及系统
CN104243508A (zh) * 2013-06-07 2014-12-24 富鸿康科技(深圳)有限公司 服务器、客户端及文件同步方法
CN106209974A (zh) * 2016-06-21 2016-12-07 浪潮电子信息产业股份有限公司 一种数据同步方法、设备及系统
CN108418746A (zh) * 2018-02-13 2018-08-17 论客科技(广州)有限公司 一种邮件同步方法、装置与计算机可读存储介质

Family Cites Families (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040031926A (ko) * 2002-10-07 2004-04-14 엘지전자 주식회사 이동 통신 단말기의 전화 번호 검색 방법
US7925754B2 (en) * 2003-11-21 2011-04-12 Microsoft Corporation Method and computer program product to provide synch notifications to client devices
US20050203905A1 (en) * 2004-03-12 2005-09-15 Samsung Electronics Co., Ltd. Method of synchronizing data between server and user terminal using messenger service system and system using the same
US20070016632A1 (en) * 2005-07-14 2007-01-18 Yahoo! Inc. System and method for synchronizing between a user device and a server in a communication network
US20070014243A1 (en) * 2005-07-14 2007-01-18 Yahoo! Inc. System and method for provisioning a user device
US8112549B2 (en) * 2005-07-14 2012-02-07 Yahoo! Inc. Alert mechanism for notifying multiple user devices sharing a connected-data-set
US7788352B2 (en) * 2005-07-14 2010-08-31 Yahoo! Inc. System and method for servicing a user device
US8024290B2 (en) * 2005-11-14 2011-09-20 Yahoo! Inc. Data synchronization and device handling
CN101009516B (zh) * 2006-01-26 2011-05-04 华为技术有限公司 一种进行数据同步的方法、系统及装置
CN100459522C (zh) * 2006-03-08 2009-02-04 华为技术有限公司 利用同步标记语言进行终端管理的方法
CN101106537A (zh) * 2006-07-14 2008-01-16 华为技术有限公司 一种选择性下载电子邮件的方法
US20080235335A1 (en) * 2007-03-20 2008-09-25 International Business Machines Corporation Method, system, and computer program product for changing the status of an existing email in a recipient email client inbox
US20080270629A1 (en) * 2007-04-27 2008-10-30 Yahoo! Inc. Data snychronization and device handling using sequence numbers
US8825815B2 (en) * 2008-01-08 2014-09-02 Amdocs Software Systems Limited System and method for client synchronization for a communication device
CN101370032B (zh) * 2008-09-09 2011-08-10 中兴通讯股份有限公司 数据同步中的修改日志维护方法和装置
US20110125856A1 (en) * 2009-11-25 2011-05-26 Lg Electronics Inc. Mobile terminal and method of providing email services in the mobile terminal
CN106161193B (zh) * 2015-04-10 2020-05-08 腾讯科技(成都)有限公司 一种邮件处理方法、装置和系统
CN108156070B (zh) * 2018-01-09 2020-07-17 论客科技(广州)有限公司 基于邮件系统的即时通讯方法、装置及系统
CN108055196B (zh) * 2018-01-09 2020-01-31 论客科技(广州)有限公司 基于即时通讯创建讨论群的方法、装置及系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013010414A1 (zh) * 2011-07-21 2013-01-24 腾讯科技(深圳)有限公司 构建索引的方法、检索方法、装置及系统
CN102291453A (zh) * 2011-08-09 2011-12-21 中兴通讯股份有限公司 一种数据同步的方法及装置
CN104243508A (zh) * 2013-06-07 2014-12-24 富鸿康科技(深圳)有限公司 服务器、客户端及文件同步方法
CN106209974A (zh) * 2016-06-21 2016-12-07 浪潮电子信息产业股份有限公司 一种数据同步方法、设备及系统
CN108418746A (zh) * 2018-02-13 2018-08-17 论客科技(广州)有限公司 一种邮件同步方法、装置与计算机可读存储介质

Also Published As

Publication number Publication date
US11159616B2 (en) 2021-10-26
CN108418746A (zh) 2018-08-17
US20210006619A1 (en) 2021-01-07
CN108418746B (zh) 2020-06-12

Similar Documents

Publication Publication Date Title
WO2019157881A1 (zh) 一种邮件同步方法、装置与计算机可读存储介质
US10482067B2 (en) Synchronization of shared folders and files
CN110188096B (zh) 一种数据记录的索引创建方法、装置及设备
WO2022126974A1 (zh) 基于Kafka的增量数据同步方法、装置、设备及介质
US9792340B2 (en) Identifying data items
CN109460413B (zh) 用于跨区块链建立账户的方法及系统
US7478113B1 (en) Boundaries
US11354065B2 (en) Cloud edition and retrieve
US20170031948A1 (en) File synchronization method, server, and terminal
EP2178033A1 (en) Populating a multi-relational enterprise social network with disparate source data
US20210240860A1 (en) Index creation for data records
CN113407560B (zh) 更新消息处理方法、数据同步方法、配置信息配置方法
KR101221672B1 (ko) 데이터 동기화 시스템
CN115033578A (zh) 一种业务数据更新的方法、相关装置及存储介质
CN111193661A (zh) 一种基于企业通信渠道融合系统的管理方法及装置
CN109165259B (zh) 基于网络附属存储的索引表更新方法、处理器及存储装置
CN110852701A (zh) 产品需求管理方法、装置和系统
CN113626438B (zh) 一种数据表管理的方法、装置、计算机设备及存储介质
CN111966650B (zh) 一种运维大数据共享数据表的处理方法、装置及存储介质
CN112073395B (zh) 一种文件分发方法和装置
CN116028196A (zh) 数据处理方法、装置及存储介质
JP2002373101A (ja) ディレクトリ間連携方法
CN110688664A (zh) 一种块链式账本中的权限管理方法、装置及设备
CN117651033B (zh) 一种邮件同步方法、装置、电子设备和存储介质
WO2021128371A1 (zh) 差分文件生成方法、增量更新方法、计算设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19753836

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19753836

Country of ref document: EP

Kind code of ref document: A1