CN104579921B - Method and device for loading e-mail - Google Patents

Method and device for loading e-mail Download PDF

Info

Publication number
CN104579921B
CN104579921B CN201410830471.5A CN201410830471A CN104579921B CN 104579921 B CN104579921 B CN 104579921B CN 201410830471 A CN201410830471 A CN 201410830471A CN 104579921 B CN104579921 B CN 104579921B
Authority
CN
China
Prior art keywords
mail
file
thread
sub
main thread
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201410830471.5A
Other languages
Chinese (zh)
Other versions
CN104579921A (en
Inventor
戴益忠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ningbo Jiangdong Hengguan Information Technology Co ltd
Original Assignee
Ningbo Jiangdong Hengguan Information Technology Co ltd
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 Ningbo Jiangdong Hengguan Information Technology Co ltd filed Critical Ningbo Jiangdong Hengguan Information Technology Co ltd
Priority to CN201410830471.5A priority Critical patent/CN104579921B/en
Publication of CN104579921A publication Critical patent/CN104579921A/en
Application granted granted Critical
Publication of CN104579921B publication Critical patent/CN104579921B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

the invention is applicable to the field of e-mail communication and provides an e-mail loading method and device. The loading method comprises the following steps: receiving a mail receiving instruction, starting a main thread, and outputting a mail list by the main thread; polling mail viewing instructions of mails in the mail list by the main thread, receiving the mail viewing instructions, and creating a sub-thread for each mail viewing instruction; the sub-thread downloads the mail corresponding to the mail viewing instruction and sends a storage path of the corresponding mail to the main thread; and the main thread receives the storage path of the corresponding mail sent by the sub-thread, reads the content of the corresponding mail according to the storage path and outputs and displays the content. The method and the system solve the problem that other mails of the mail client cannot be loaded simultaneously when the large-capacity mails are loaded, save the waiting time of the user, improve the mail checking efficiency and improve the experience of the user.

Description

Method and device for loading e-mail
Technical Field
The invention belongs to the field of e-mail communication, and particularly relates to a method and a device for loading an e-mail.
background
At present, work management software in each enterprise and public institution is provided with a module for managing mails, the module is a mail client, the existing mail loading method of the mail client is that a user clicks to open a mail, a main program of the mail client downloads and displays the mail, and the operation of opening the next mail can be carried out only after the current selected and opened mail is downloaded and displayed. The existing mail loading method of the mail client has the problems that when the mail capacity is large and a plurality of pictures exist in the mail, the mail loading needs a long time, and if a user wants to browse the next mail, the user needs to wait for the completion of the loading of the current mail, and when the number of the mails in an inbox is large, the waiting time is longer, so that the mail viewing efficiency is low, the user time is wasted, and the user experience is poor.
Disclosure of Invention
the embodiment of the invention provides a method and a device for loading an email, aiming at solving the problem that other emails of an email client cannot be loaded simultaneously when a large-capacity email is loaded.
to achieve the above object, the present invention provides a method for loading an email, comprising:
receiving a mail receiving instruction, starting a main thread, and outputting a mail list by the main thread;
Polling mail viewing instructions of mails in the mail list by the main thread, receiving the mail viewing instructions, and creating a sub-thread for each mail viewing instruction;
The sub-thread downloads the mail corresponding to the mail viewing instruction and sends a storage path of the corresponding mail to the main thread;
and the main thread receives the storage path of the corresponding mail sent by the sub-thread, reads the content of the corresponding mail according to the storage path and outputs and displays the content.
the present invention also provides an email loading device, including:
the mail receiving module is used for receiving a mail receiving instruction, starting a main thread and outputting a mail list by the main thread;
The mail viewing module is used for polling mail viewing instructions of mails in the mail list by the main thread, receiving the mail viewing instructions and creating a sub-thread aiming at each mail viewing instruction;
The mail downloading module is used for downloading the mail corresponding to the mail viewing instruction by the sub-thread and sending the storage path of the corresponding mail to the main thread;
and the mail output module is used for receiving the storage path of the corresponding mail sent by the sub-thread by the main thread, reading the content of the corresponding mail according to the storage path and outputting and displaying the content.
According to the method and the device for loading the e-mails, the main thread polls the mail viewing instructions of the mails in the mail list, receives the mail viewing instructions, and creates a sub-thread aiming at each mail viewing instruction, so that even if the number of the mails of a user is large, the capacity of each mail is large and comprises a plurality of pictures, when the user opens a first mail and the time required to be loaded is very long, the user does not need to open a second mail after the first mail is loaded, but can open the second mail and view a plurality of mails behind the second mail while the first mail is loaded, the waiting time of the user is saved, the mail viewing efficiency is improved, and the experience of the user is improved.
drawings
FIG. 1 is a flowchart illustrating a first embodiment of a method for loading an email according to the present invention;
FIG. 2 is a flowchart illustrating a loading method of an e-mail according to a second embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a first embodiment of a loading device for an email according to the present invention;
FIG. 4 is a diagram illustrating a second embodiment of an electronic mail loading apparatus according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the invention has the specific scheme that:
as shown in fig. 1, a first embodiment of the present invention provides a method for loading an email, including:
Step S101, receiving a mail receiving instruction, starting a main thread, and outputting a mail list by the main thread;
the user runs the management software, opens the mail client mail management module, and sends a mail receiving instruction after clicking the mail receiving option, and the mail management module of the mail client runs the main thread after receiving the mail receiving instruction, displays an inbox interface, and outputs a mail list in the interface, wherein the interface contains list information of each mail in the inbox, and the list information comprises the reading state of the mail, the name of a sender, the mail subject, the sending date and the like.
Step S102, the main thread polls the mail viewing instruction of the mails in the mail list, receives the mail viewing instruction and creates a sub-thread for each mail viewing instruction;
after the main thread outputs an inbox mail list, processing a message instruction of a user for checking a mail in a polling mode, waiting for the user to click the mail for checking operation, when the user selects any mail (named as a mail 1) in the inbox to click and open the mail, sending the mail checking instruction to the main thread, after the main thread receives the mail checking instruction, creating a sub-thread (named as a sub-thread 1), wherein the sub-thread 1 independently processes a downloading task of the mail 1, and after the main thread creates the sub-thread 1, continuously waiting for receiving the mail checking instruction.
when the sub-line 1 finishes downloading the mail 1 or downloads the mail 1, the user clicks and checks another mail (named as a mail n) in the inbox, the main thread receives the mail checking instruction and then creates a sub-line (named as a sub-line n), the sub-line n independently processes the downloading task of the mail n, and the main thread continues to wait for receiving the mail checking instruction.
in the step, the main thread and the plurality of sub-threads run in parallel, and the respective tasks are processed simultaneously.
step S103, the sub-thread downloads the mail corresponding to the mail viewing instruction and sends the storage path of the corresponding mail to the main thread;
and after the sub thread is created, executing a corresponding mail downloading task.
and the sub-thread downloads the corresponding mail from the local mail server to a local user storage disk, and sends the storage path of the corresponding mail to the main thread after the mail is finished.
This step makes it possible for several sub-threads to download several mails simultaneously.
step S104, the main thread receives a storage path of the corresponding mail sent by the sub-thread, reads the content of the corresponding mail according to the storage path and outputs and displays the content;
And after receiving the storage path of the corresponding mail file sent by the sub-thread, the main thread reads the content of the mail and outputs the content to a mail text display interface of the mail client to be displayed to a user.
in the embodiment, the downloading task of the mail is handed to the corresponding sub-thread for processing, the main program waits for other operations of the user, when the sub-thread downloads the corresponding mail and the user clicks to open the second mail, the main program additionally starts a new thread to download the second mail, so that the multi-thread loading of multiple mails is realized, the waiting time of the user is saved, the mail viewing efficiency is improved, and the experience of the user is improved.
as shown in fig. 2, a second embodiment of the present invention provides a method for loading an email, which further includes, after step S103 of the first embodiment:
Step S201, searching a mail file and a mail latch file in a mail database of a local server according to the mail ID;
the main text and the picture of the mail content of the local server are stored separately, the calling address of the main text and the picture of the mail are stored in a mail body file, the mail picture is stored in a mail attachment file, specifically, the mail body file is a mail file, the mail attachment file is a mail attach file, the sub-thread searches the mail file and the mail attach file of the corresponding mail on the server by using the ID of the corresponding mail as an identification mark, and acquires the storage position of the file on the server.
Step S202, downloading the mail and mail attachment file contents of the mail to the html file and mail attachment file in the local user storage disc;
and downloading the mail content to a local user storage disk, wherein the mail text and the picture are respectively stored in a mail body file and a mail attached file, and the mail body file comprises a text table part of the mail text and a calling address of the mail picture. Specifically, the html file referred to herein is a mail body file, and the child thread downloads the corresponding mail file on the server to the mail body html file and the mail attachment file on the local user storage disk;
Step S203, modifying the calling address of the mail picture in the html file;
Because the storage address of the picture of the mail on the local mail server is changed after being downloaded to the local user storage disk, and the picture calling address of the html file of the mail body is not changed after being downloaded to the local user storage disk, the sub-thread must modify the calling address of the picture in the html file to correctly call the picture address in the text display interface of the local mail for output display.
step S204, sending the html file to a main thread from the storage path of the local user storage disk;
and the child thread finishes executing after sending the modified html file storage path to the main thread.
in the downloading process of the mail, the sub-thread is respectively downloaded to the local user storage disks in a mode that the mail is separately stored in the local mail server, when the mail needs to output the text and the picture, the text and the picture are rapidly displayed to the user directly according to the calling address of the picture in the mail body file, the loading speed is improved, and the user experience is improved.
As shown in fig. 3, a first embodiment of the present invention provides an email loading device, including:
A mail receiving module 301, configured to receive a mail receiving instruction, start a main thread, and output a mail list by the main thread;
after receiving an operation instruction of opening an inbox and receiving a mail by a user, a mail management module of the mail client starts a main thread, and the main thread outputs a mail list and mail list information in the inbox.
The mail viewing module 302 is configured to poll mail viewing instructions for mails in the mail list by a main thread, receive the mail viewing instructions, and create a sub-thread for each mail viewing instruction;
The module polls the checking instruction of the mail, creates sub-threads after receiving the instruction of the user for checking the mail, and downloads the corresponding mail created by the sub-threads when inquiring a plurality of mail checking instructions.
a mail downloading module 303, configured to download, by the sub-thread, a mail corresponding to the mail viewing instruction, and send a storage path of the corresponding mail to the main thread;
the module sub-thread downloads the corresponding mail to the local user storage disk, and sends the storage path of the mail file on the local user storage disk to the main thread after the downloading is finished.
And the mail output module 304 is used for the main thread receiving the storage path of the corresponding mail sent by the sub-thread, reading the content of the corresponding mail according to the storage path and outputting and displaying the content.
The main thread of the module receives the storage path of the mail file of the local user storage disk sent by the sub-thread, reads the mail content according to the storage path of the mail file, and outputs the mail content to the mail text display interface of the mail client side to be displayed to the user.
the mail downloading task of the embodiment is specially processed by the mail downloading module 303, the mail viewing module 302 performs polling processing on the mail viewing operation instruction of the user, the mail viewing module 302 can create a plurality of sub-threads according to a plurality of received instructions to perform downloading of corresponding mails, so that the whole mail receiving and managing module can download and output and display other mails in an inbox while downloading a mail, the user can reasonably utilize the time of downloading a large-capacity mail, and the mail viewing efficiency is improved.
As shown in fig. 4, a second embodiment of the present invention provides an email loading apparatus, which further includes, after the email downloading module 303 of the first embodiment:
a searching module 401, configured to search a mail file on a local mail server;
In the module, a sub thread searches a mail file and a mail graph file of a mail on a server by using the ID of the mail as an identification mark, acquires the storage position of the file on the server, stores the calling address of the text and the picture of the mail in the mail file, and stores the picture of the mail in the mail graph file.
a storage module 402, configured to store the mail file on the local mail server to a local user storage disk;
The module sub-thread respectively stores the mail and mail slot files of the mail on the local mail server into the html file and mail attachment file of the mail body on the local user storage disk.
A modifying module 403, configured to modify a calling address of a picture in a mail body file of a local user storage disk;
and the sub-thread modifies the calling address of the picture in the html file due to the change of the storage positions of the html file and the attached file of the mail downloaded to the local user storage disk.
A sending module 404, configured to send the storage path of the mailbox body file of the local user storage disk to the main thread.
In the embodiment, in the downloading process of the mail downloading module, the sub-thread downloads the mail body file and the mail attachment file which are separately stored in the local mail server by the mail to the local user storage disc respectively according to the searching module, the storage module, the modifying module and the sending module, and when the mail needs to output the text and the picture, the mail is rapidly displayed to the user according to the calling address of the picture in the mail body file, so that the loading speed is increased, and the user experience is improved.
the above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

Claims (4)

1. A method for loading an e-mail, comprising:
receiving a mail receiving instruction, starting a main thread, and outputting a mail list by the main thread;
Polling mail viewing instructions of mails in the mail list by the main thread, receiving the mail viewing instructions, and creating a sub-thread for each mail viewing instruction;
the sub-thread downloads the mail corresponding to the mail viewing instruction and sends a storage path of the corresponding mail to the main thread;
when the created sub-thread downloads the mail, if the main thread receives a new mail viewing instruction, the main thread creates a new independent sub-thread for downloading the corresponding mail; the main thread and the created multiple sub-threads run in parallel, and the multiple sub-threads download respective corresponding mails simultaneously;
The main thread receives a storage path of a corresponding mail sent by the sub-thread, reads the content of the corresponding mail according to the storage path and outputs and displays the content, the sub-thread downloads the mail corresponding to the mail viewing instruction, and the sending of the storage path of the corresponding mail to the main thread specifically comprises the following steps: searching a mail file on a local mail server; downloading the mail file on the local mail server to a local user storage disc; sending a storage path of the mail body file on a local user storage disk to a main thread;
In the mail file on the local mail server, the calling addresses of the mail text and the picture are stored in a mail body file, and the mail picture is stored in a mail attached file; downloading the mail text and the picture into a mail file of a local user storage disc, wherein the mail text and the picture are respectively stored in a mail body file and a mail attached file, and the mail body file comprises a text table part of the mail text and a calling address of the mail picture;
the path of the mail auxiliary file stored separately from the mail body file is changed after the mail auxiliary file is downloaded to a local user storage disc, the sub-thread modifies the calling address of the picture in the mail body file of the local user storage disc to make the address consistent with the storage path of the mail auxiliary file downloaded to the local user storage disc, and sends the storage path of the mail body file newly generated after modification on the local user storage disc to the main thread.
2. The method of claim 1, wherein said receiving mail pickup instruction step is preceded by the step of: and operating the mail client software and opening a mail management operation interface.
3. An electronic mail loading apparatus, comprising:
the mail receiving module is used for receiving a mail receiving instruction, starting a main thread and outputting a mail list by the main thread;
The mail viewing module is used for polling mail viewing instructions of mails in the mail list by the main thread, receiving the mail viewing instructions and creating a sub-thread aiming at each mail viewing instruction, wherein the sub-threads can simultaneously download the corresponding mails;
the mail downloading module is used for downloading the mail corresponding to the mail viewing instruction by the sub-thread and sending the storage path of the corresponding mail to the main thread; and
the mail output module is used for receiving a storage path of a corresponding mail sent by the sub-thread by the main thread, reading the content of the corresponding mail according to the storage path and outputting and displaying the content;
The file separation downloading module is used for respectively downloading the mail content into a mail body file and a mail attached file of a local user storage disc, wherein the mail body file and the mail picture are respectively stored in the mail body file and the mail attached file, and the mail body file comprises a character table part of the mail body and a calling address of the mail picture;
The mail downloading module specifically comprises:
The searching module is used for searching the mail file on the local mail server;
The storage module is used for storing the mail file on the local mail server to a local user storage disk; and
the sending module is used for sending the storage path of the mail body file of the local user storage disk to the main thread;
And the modifying module is used for modifying the calling address of the picture in the mail body file of the local user storage disk.
4. The apparatus of claim 3, further comprising:
and the mail management module is used for operating the mail client software and opening a mail management operation interface.
CN201410830471.5A 2014-12-27 2014-12-27 Method and device for loading e-mail Active CN104579921B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410830471.5A CN104579921B (en) 2014-12-27 2014-12-27 Method and device for loading e-mail

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410830471.5A CN104579921B (en) 2014-12-27 2014-12-27 Method and device for loading e-mail

Publications (2)

Publication Number Publication Date
CN104579921A CN104579921A (en) 2015-04-29
CN104579921B true CN104579921B (en) 2019-12-13

Family

ID=53095164

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410830471.5A Active CN104579921B (en) 2014-12-27 2014-12-27 Method and device for loading e-mail

Country Status (1)

Country Link
CN (1) CN104579921B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110572311B (en) * 2019-08-09 2022-01-11 青岛海信移动通信技术股份有限公司 Mail downloading method and terminal
CN113343070A (en) * 2021-04-14 2021-09-03 统信软件技术有限公司 Mail searching method and computing device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000055728A1 (en) * 1999-03-15 2000-09-21 Netpliance, Inc. Method and system for communicating over the internet
CN1312508A (en) * 2001-04-28 2001-09-12 国家数字交换***工程技术研究中心 E-mail receiver/send system and method
CN101039309A (en) * 2006-03-16 2007-09-19 联想(北京)有限公司 Link sharing service apparatus and communication method thereof
CN101283341A (en) * 2005-07-28 2008-10-08 Jmj软件有限公司 Systems, methods and apparatus of an email client
CN101938579A (en) * 2009-06-30 2011-01-05 中兴通讯股份有限公司 Seating system based on multi-process and method for realizing seating business
CN103207785A (en) * 2013-04-23 2013-07-17 北京奇虎科技有限公司 Method, device, and system for processing data download request

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102025647B (en) * 2009-09-17 2013-11-06 中国长城工业总公司 System and method for mail sending and receiving
JP4852638B2 (en) * 2009-09-28 2012-01-11 株式会社沖データ Mail management apparatus, composite apparatus, and communication method
CN103595615B (en) * 2012-08-15 2018-10-19 腾讯科技(深圳)有限公司 The method of sending and receiving of Email, terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000055728A1 (en) * 1999-03-15 2000-09-21 Netpliance, Inc. Method and system for communicating over the internet
CN1312508A (en) * 2001-04-28 2001-09-12 国家数字交换***工程技术研究中心 E-mail receiver/send system and method
CN101283341A (en) * 2005-07-28 2008-10-08 Jmj软件有限公司 Systems, methods and apparatus of an email client
CN101039309A (en) * 2006-03-16 2007-09-19 联想(北京)有限公司 Link sharing service apparatus and communication method thereof
CN101938579A (en) * 2009-06-30 2011-01-05 中兴通讯股份有限公司 Seating system based on multi-process and method for realizing seating business
CN103207785A (en) * 2013-04-23 2013-07-17 北京奇虎科技有限公司 Method, device, and system for processing data download request

Also Published As

Publication number Publication date
CN104579921A (en) 2015-04-29

Similar Documents

Publication Publication Date Title
US10209861B2 (en) Sticky messages
KR102355839B1 (en) Apparatus and method for maintaining a message thread with opt-in permanence for entries
US10097485B2 (en) System and method to deliver emails as expressive conversations on mobile interfaces
EP2456147B1 (en) User-interface for computing devices
CA2866942C (en) Method, apparatus and computer storage medium for plug-in management and control
US9338114B2 (en) Automatic conversation techniques
US8315607B2 (en) Method and system for filtering incoming messages to a mobile device
US11159475B2 (en) Sending a read receipt to each user specified on a read receipt distribution list
US8949956B1 (en) Multi-account messaging management
US20140059450A1 (en) Combined message boxes
US20140379825A1 (en) Sender-specific email reminder system and method
US10439967B2 (en) Attachment reply handling in networked messaging systems
KR20160137563A (en) Inline document collaboration workflow
US20140122621A1 (en) Methods and systems for organizing electronic messages
WO2022257599A1 (en) Email management method and electronic device
CN104636026A (en) File saving method and device and mobile terminal
US20220377030A1 (en) Information presentation method, apparatus, electronic device, and storage medium
US9292170B2 (en) Unified presentation of scattered message data
CN104579921B (en) Method and device for loading e-mail
US9525756B2 (en) Method and apparatus for invoking content of contact list
US7958197B2 (en) Dynamic type-ahead for lists of prior specified addressees
EP3965396B1 (en) Interactive information notification method, apparatus and device, and computer readable storage medium
WO2017180451A1 (en) Person centric applications
US9076130B2 (en) Identifying a webpage from which an E-mail address is obtained
US20140215474A1 (en) Implementing a workflow on data items

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant