CN112800318B - Mail searching method and computing device - Google Patents

Mail searching method and computing device Download PDF

Info

Publication number
CN112800318B
CN112800318B CN202110397746.0A CN202110397746A CN112800318B CN 112800318 B CN112800318 B CN 112800318B CN 202110397746 A CN202110397746 A CN 202110397746A CN 112800318 B CN112800318 B CN 112800318B
Authority
CN
China
Prior art keywords
search
mails
mail
directory
threads
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
CN202110397746.0A
Other languages
Chinese (zh)
Other versions
CN112800318A (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.)
Uniontech Software Technology Co Ltd
Original Assignee
Uniontech Software 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 Uniontech Software Technology Co Ltd filed Critical Uniontech Software Technology Co Ltd
Priority to CN202110699375.1A priority Critical patent/CN113343070A/en
Priority to CN202110397746.0A priority patent/CN112800318B/en
Publication of CN112800318A publication Critical patent/CN112800318A/en
Application granted granted Critical
Publication of CN112800318B publication Critical patent/CN112800318B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/107Computer-aided management of electronic mailing [e-mailing]

Abstract

The invention discloses a mail searching method, which comprises the following steps: receiving a search request, and determining search information and a search directory according to the search request, wherein the search directory comprises one or more file directories; determining the total number of mails included in the search directory, and judging whether the total number of the mails is greater than a first threshold value; if the total number of mails is determined to be greater than the first threshold, creating a thread pool comprising one or more threads; for each file directory included in the search directory, respectively creating one or more task objects according to a plurality of mails included in the file directory, wherein each task object includes one or more mails; processing each task object by utilizing the threads in the thread pool according to the search information to obtain a target mail in each task object; and generating a search result list according to the target mails in each task object and displaying the search result list. The invention also discloses corresponding computing equipment. The mail searching method improves the searching efficiency of the mails with large data volume.

Description

Mail searching method and computing device
Technical Field
The invention relates to the technical field of computers and internet, in particular to a mail searching method and computing equipment.
Background
Mailbox clients are important office software for enterprises and individuals to work and are often used in daily work. Mail searching is one of the important functions commonly used by mailbox clients. For business offices, the number of mails in an enterprise mailbox account is accumulated more and more due to the use requirement on work. When the number of mails in the mailbox bound by the mailbox client is large, the search speed is slow due to too much mail data when the mail search is performed. When the number of the mails reaches the level of tens of thousands, a user can consume more time for searching the mails every time, so that the working efficiency of the user is influenced, the user experience is poor, and the use viscosity of the user is reduced.
Aiming at the search of the mails with large data volume, how to improve the search speed of the mails, quickly display the search results, enhance the experience of users and become a problem to be solved urgently.
For this reason, a mail search method is required to solve the problems in the above-described technical solutions.
Disclosure of Invention
To this end, the present invention provides a mail search method in an attempt to solve or at least alleviate the above-presented problems.
According to one aspect of the invention, a mail searching method is provided, which is executed by a mailbox client in a computing device and comprises the following steps: receiving a search request, and determining search information and a search directory according to the search request, wherein the search directory comprises one or more file directories; determining the total number of mails included in the search directory, and judging whether the total number of the mails is greater than a first threshold value; if the total number of mails is determined to be greater than the first threshold, creating a thread pool comprising one or more threads; for each file directory included in the search directory, respectively creating one or more task objects according to a plurality of mails included in the file directory, wherein each task object includes one or more mails; processing each task object by utilizing the threads in the thread pool according to the search information to obtain a target mail in each task object; and generating a search result list according to the target mails in each task object and displaying the search result list.
Alternatively, in the mail searching method according to the present invention, the step of processing each task object according to the search information includes: judging whether the content of each mail in the task object comprises search information or not; and if the search information is included, determining the mail as the target mail.
Optionally, in the mail searching method according to the present invention, the step of creating one or more task objects includes: determining the number of mails included in the file directory; and determining the number of task objects to be created according to the number of the mails, creating the task objects with corresponding number, and distributing one or more mails in the file directory for each task object.
Optionally, in the mail searching method according to the present invention, the step of determining the number of task objects to be created according to the number of mails includes: judging whether the number of the mails is larger than a second threshold value; if the number of the task objects is larger than the second threshold value, determining the number of the task objects based on the number of the mails and the second threshold value, and distributing a second threshold value of mails for each task object after the corresponding number of task objects are created; if the mail is not larger than the second threshold value, a task object is created, and all mails under the file directory are distributed to the task object.
Optionally, in the mail searching method according to the present invention, before creating one or more task objects based on a plurality of mails included in a file directory, the method includes the steps of: each file directory included in the search directory is traversed.
Optionally, in the mail searching method according to the present invention, the step of creating a thread pool including one or more threads includes: acquiring hardware information of the computing equipment, and determining the number of threads according to the hardware information to create a corresponding number of threads.
Optionally, in the mail searching method according to the present invention, determining the number of threads according to the hardware information includes: determining the number of threads according to the hardware information comprises: determining the number of threads according to the number of the CPU cores; the formula for determining the number of threads according to the number of CPU cores is K = M/2, where K represents the number of threads and M represents the number of CPU cores.
Optionally, in the mail searching method according to the present invention, further comprising the steps of: if it is determined that the total number of mail pieces is not greater than the first threshold value: traversing each mail under each file directory included in the search directory to judge whether the content of each mail comprises search information; if the search information is included, determining the mail as a target mail; and generating a search result list according to each target mail and displaying the search result list.
Optionally, in the mail searching method according to the present invention, the search directory is a file directory corresponding to a mailbox account node.
According to an aspect of the present invention, there is provided a computing device comprising: at least one processor; and a memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, the program instructions comprising instructions for performing the mail search method as described above.
According to an aspect of the present invention, there is provided a readable storage medium storing program instructions which, when read and executed by a computing device, cause the computing device to perform the method as described above.
According to the technical scheme, the invention provides the mail searching method, aiming at the searching of the mails with large data volume, the thread pool comprising one or more threads is established, and the task objects comprising a plurality of mails are established for the mails under each file directory, so that the task objects can be processed in sequence by utilizing the threads, thereby improving the searching efficiency of the mails, saving the time of searching the mails for each time by a user and further enhancing the user experience.
Further, the thread for processing the mail search is created based on half of the number of the CPU cores, so that the influence on the system operation and the operation state of other application programs can be avoided as much as possible when the large-data-volume mail search is carried out.
Drawings
To the accomplishment of the foregoing and related ends, certain illustrative aspects are described herein in connection with the following description and the annexed drawings, which are indicative of various ways in which the principles disclosed herein may be practiced, and all aspects and equivalents thereof are intended to be within the scope of the claimed subject matter. The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description read in conjunction with the accompanying drawings. Throughout this disclosure, like reference numerals generally refer to like parts or elements.
FIG. 1 shows a schematic diagram of a computing device 100, according to one embodiment of the invention;
FIG. 2 shows a flow diagram of a mail search method 200 according to one embodiment of the invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Fig. 1 is a schematic block diagram of an example computing device 100.
As shown in FIG. 1, in a basic configuration 102, a computing device 100 typically includes a system memory 106 and one or more processors 104. A memory bus 108 may be used for communication between the processor 104 and the system memory 106.
Depending on the desired configuration, the processor 104 may be any type of processing, including but not limited to: a microprocessor (UP), a microcontroller (UC), a digital information processor (DSP), or any combination thereof. The processor 104 may include one or more levels of cache, such as a level one cache 110 and a level two cache 112, a processor core 114, and registers 116. The example processor core 114 may include an Arithmetic Logic Unit (ALU), a Floating Point Unit (FPU), a digital signal processing core (DSP core), or any combination thereof. The example memory controller 118 may be used with the processor 104, or in some implementations the memory controller 118 may be an internal part of the processor 104.
Depending on the desired configuration, system memory 106 may be any type of memory, including but not limited to: volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.), or any combination thereof. System memory 106 may include an operating system 120, one or more applications 122, and program data 124. In some implementations, the application 122 can be arranged to execute instructions on an operating system with program data 124 by one or more processors 104.
Computing device 100 also includes a storage device 132, storage device 132 including removable storage 136 and non-removable storage 138.
Computing device 100 may also include a storage interface bus 134. The storage interface bus 134 enables communication from the storage devices 132 (e.g., removable storage 136 and non-removable storage 138) to the basic configuration 102 via the bus/interface controller 130. At least a portion of the operating system 120, applications 122, and data 124 may be stored on removable storage 136 and/or non-removable storage 138, and loaded into system memory 106 via storage interface bus 134 and executed by the one or more processors 104 when the computing device 100 is powered on or the applications 122 are to be executed.
Computing device 100 may also include an interface bus 140 that facilitates communication from various interface devices (e.g., output devices 142, peripheral interfaces 144, and communication devices 146) to the basic configuration 102 via the bus/interface controller 130. The example output device 142 includes a graphics processing unit 148 and an audio processing unit 150. They may be configured to facilitate communication with various external devices, such as a display or speakers, via one or more a/V ports 152. Example peripheral interfaces 144 may include a serial interface controller 154 and a parallel interface controller 156, which may be configured to facilitate communication with external devices such as input devices (e.g., keyboard, mouse, pen, voice input device, touch input device) or other peripherals (e.g., printer, scanner, etc.) via one or more I/O ports 158. An example communication device 146 may include a network controller 160, which may be arranged to facilitate communications with one or more other computing devices 162 over a network communication link via one or more communication ports 164.
A network communication link may be one example of a communication medium. Communication media may typically be embodied by computer readable instructions, data structures, program modules, and may include any information delivery media, such as carrier waves or other transport mechanisms, in a modulated data signal. A "modulated data signal" may be a signal that has one or more of its data set or its changes made in a manner that encodes information in the signal. By way of non-limiting example, communication media may include wired media such as a wired network or private-wired network, and various wireless media such as acoustic, Radio Frequency (RF), microwave, Infrared (IR), or other wireless media. The term computer readable media as used herein may include both storage media and communication media.
Computing device 100 may be implemented as a personal computer including both desktop and notebook computer configurations. Of course, computing device 100 may also be implemented as part of a small-form factor portable (or mobile) electronic device such as a cellular telephone, a digital camera, a Personal Digital Assistant (PDA), a personal media player device, a wireless web-watch device, a personal headset, an application specific device, or a hybrid device that include any of the above functions. And may even be implemented as a server, such as a file server, a database server, an application server, a WEB server, and so forth. The embodiments of the present invention are not limited thereto.
In an embodiment in accordance with the invention, the computing device 100 is configured to perform a mail search method 200 in accordance with the invention. Among other things, the application 122 of the computing device 100 contains a plurality of program instructions for executing the mail search method 200 of the present invention, which can be read and executed by the computing device 100, so that the computing device 100 executes the mail search method 200 according to the present invention.
In one embodiment, mailbox client 300 is included in application 122 of computing device 100, and mailbox client 300 contains a plurality of program instructions for performing mail search method 200 of the present invention, such that mail search method 200 of the present invention may be performed at mailbox client 300.
FIG. 2 shows a flow diagram of a mail search method 200 according to one embodiment of the invention.
As shown in fig. 2, the method 200 begins at step S210. In step S210, a search request for the mail from the user is received, and search information and a search list are determined according to the search request. Here, the search information is, for example, character string information. The search directory may include one or more file directories, and each file directory may include one or more mails.
According to one embodiment, the mailbox client may include one or more mailbox account nodes, and each mailbox account node may include one or more file directories, such as file directories including an inbox, a draft box, sent mail, deleted mail, and the like, but is not limited to those listed herein. The search directory based on which the user sends the search request for the mail may be a directory corresponding to any mailbox account node, that is, the user may search the mail based on the search information under the mailbox account node. For example, a user selects a mailbox account node on a mailbox interface, inputs search information to a search column in the mailbox interface under the mailbox account node to send a search request to a mailbox client, the search request acquired by the mailbox client includes the search information and search directory information corresponding to the mailbox account node, and the search directory includes all file directories under the mailbox account node.
Subsequently, in step S220, the total number of mails included in the search list is determined, and it is determined whether the total number of mails is greater than a first threshold. Here, the total number of mails included in the search directory is the sum of the numbers of mails in each file directory included in the search directory, that is, the sum of the numbers of mails in all file directories under the corresponding mailbox account node.
It should be noted that the first threshold may reflect whether the total number of mails in the search directory is too much to meet the search condition of the mails with large data volume, and a search mechanism for the mails with large number needs to be adopted. When the total number of the mails is larger than the first threshold value, the total number of the mails is determined to be in accordance with the mails with large data volume, and a searching mechanism aiming at the mails with large data volume needs to be adopted, and further, the following steps S240 to S260 are executed to realize the searching of the mails with large data volume.
If it is determined that the total number of mails is greater than the first threshold, step S230 is performed. In step S230, a thread pool is created that includes one or more threads. In this way, a thread pool may be invoked to conduct a search for large data volume mail using one or more threads. Here, the invention is not limited to the specific number of threads in the created thread pool, which may be determined according to the configuration of the computing device.
It should be noted that the present invention is not limited to specific values of the first threshold. In one embodiment, the first threshold is 6000, but the invention is not limited thereto.
Subsequently, in step S240, each file directory included in the search directory is traversed in a loop, and for each file directory included in the search directory, one or more task objects are respectively created according to the mails included in the file directory, where each task object respectively includes one or more mails. Here, by creating a task object, the task object can be processed based on the created thread to realize a search for a large-data-volume mail.
Subsequently, in step S250, each task object created in step S240 is processed with one or more threads in a thread pool, the threads being adapted to process each task object according to the search information. Here, each task object in the task queue is processed in turn by calling the thread pool by adding each task object created to the task queue.
It should be noted that, according to the technical solution of the present invention, when the total number of mails is greater than the first threshold and a search mechanism for a large data volume mail is adopted, a thread pool including one or more threads is created, and a task object including a plurality of mails is created for the mail under each file directory, so that the task object can be processed by using the threads, thereby improving the search efficiency of the mail, saving the time for the user to search the mail each time, and further enhancing the user experience.
Finally, in step S260, a search result list is generated according to the target mails in each task object, and the search result list is presented in the interface of the mailbox client, so that the user can view the target mails in the search result list. Here, the search result list includes information of a plurality of target mails, where each item in the search result list corresponds to one target mail information, respectively.
According to one embodiment, when one or more task objects are created according to a plurality of mails included in a file directory, the number of the mails included in the file directory is determined, the number of the task objects to be created is determined according to the number of the mails included in the file directory, and then the task objects with the corresponding number are created, and one or more mails in the file directory are respectively allocated to each task object.
Further, after the number of mails included in the file directory is determined, whether the number of mails is larger than a second threshold value is judged, if the number of mails in the file directory is larger than the second threshold value, the number of task objects to be created is determined according to the number of mails and the second threshold value, and after a corresponding number of task objects are created, a second threshold value number of mails are distributed to each task object. That is, when creating the task object, the task object is created according to the second threshold number of mails corresponding to each task object, so that when the number of mails in the file directory is greater than the second threshold, the number of the task objects to be created can be determined according to the ratio of the number of mails to the second threshold (when the ratio is a decimal number, the integer is added by 1), and then the second threshold number of mails are allocated to each task object. In addition, when the number of the mails left in the last distribution is less than the second threshold value, the mails left in the number less than the second threshold value are individually distributed to one task object.
If the mail address is not larger than the second threshold value, only one task object is created, and all mails under the file directory are allocated to the task object.
It should be noted that the present invention is not limited to the specific value of the second threshold. In one embodiment, the second threshold is 500, but the invention is not limited thereto.
According to one embodiment, in step S250, when processing each task object according to the search information, each task object is processed in turn by a thread, wherein for each task object, the content of each mail in the task object is checked in turn, and whether to take the mail as a target mail is determined by judging whether the search information is included in the content of each mail. Here, the content of the mail includes a subject of the mail, sender information, recipient information, a body of the mail, and the like, so that whether the mail is a target mail is determined by judging whether the subject of the mail, the sender information, the recipient information, the body of the mail include search information.
For each mail in the task object, if the content of the mail comprises search information, determining the mail as a target mail, and storing the target mail; and if the content of the mail does not comprise the search information, checking the next mail in the task object, judging whether the content of the next mail comprises the search information or not, and further determining whether the next mail is determined as the target mail or not. In this way, after each task object is processed according to the search information, the target mail in each task object can be acquired.
And if the search information is included in the mail content, determining the mail as the target mail. Otherwise, if the mail content does not include the search information, the content of the next mail is checked, and whether the next mail is the target mail is judged. And further, each determined target mail is obtained, a search result list is generated according to each determined target mail, and the search result list is displayed in an interface of the mailbox client, so that a user can view the target mails in the search result list. Here, the search result list includes information of a plurality of target mails, where each item in the search result list corresponds to one target mail information, respectively.
According to one embodiment, in step S230, by acquiring hardware information of the computing device 100, the number of threads to be created is determined according to the number of CPU cores (the number of CPU core unit groups) in the hardware information, and further, a corresponding number of threads are created. It should be noted that the present invention is not limited to the relationship between the number of CPU cores and the number of threads, for example, one core unit group may be set to correspond to one thread, or one core unit group may be set to correspond to two threads when the CPU of the current operating environment of the mailbox client supports the hyper-threading technology.
According to one embodiment, the number of threads in the created thread pool is represented as K, the number of CPU cores of the computing device 100 is represented as M, and the relationship between the number of CPU cores and the number of threads may be formulated as K = M/2 regardless of whether the CPU of the current runtime environment of the mailbox client supports the hyper-threading technology. In other words, the formula for determining the number of threads from the number of CPU cores is K = M/2, where K denotes the number of threads, M denotes the number of CPU cores, and the minimum value of K is 1. That is, the present invention handles mail searching by turning on half the number of CPU cores. Therefore, the invention can search the mails with large data volume by starting the thread under the condition of not influencing the system operation and the operation states of other application programs, thereby improving the mail searching efficiency, saving the time for searching the mails each time and avoiding the phenomenon of interface jamming.
In addition, according to an embodiment of the present invention, if it is determined in step S220 that the total number of mails in all file directories under the search directory is not greater than the first threshold, it is explained that it is not necessary to employ a search mechanism for a large-data-volume mail, in which case the mail is processed by performing the following method:
and traversing each mail under each file directory included in the search directory, checking the content of each mail, and judging whether the content of each mail comprises search information. Here, the content of the mail includes a subject of the mail, sender information, recipient information, a body of the mail, and the like, so that whether the mail is a target mail is determined by judging whether the subject of the mail, the sender information, the recipient information, the body of the mail include search information.
In summary, according to the mail search method of the present invention, for searching a large data volume mail, a thread pool including one or more threads is created, and a task object including a plurality of mails is created for the mail under each file directory, so that the task objects can be sequentially processed by using the threads, thereby improving the mail search efficiency when searching the large data volume mail, saving the time of searching the mail by the user each time, and further enhancing the user experience. And, the invention creates the thread used for processing the mail search based on half of the number of CPU cores, thus, when carrying on the mail search of the large data volume, can avoid the influence on system operation and other application program operating condition as far as possible.
The various techniques described herein may be implemented in connection with hardware or software or, alternatively, with a combination of both. Thus, the methods and apparatus of the present invention, or certain aspects or portions thereof, may take the form of program code (i.e., instructions) embodied in tangible media, such as removable hard drives, U.S. disks, floppy disks, CD-ROMs, or any other machine-readable storage medium, wherein, when the program is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention.
In the case of program code execution on programmable computers, the computing device will generally include a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. Wherein the memory is configured to store program code; the processor is configured to execute the multilingual spam-text recognition method of the present invention according to instructions in said program code stored in the memory.
By way of example, and not limitation, readable media may comprise readable storage media and communication media. Readable storage media store information such as computer readable instructions, data structures, program modules or other data. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Combinations of any of the above are also included within the scope of readable media.
In the description provided herein, algorithms and displays are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with examples of this invention. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in a device as described in this embodiment or alternatively may be located in one or more devices different from the devices in this example. The modules in the foregoing examples may be combined into one module or may be further divided into multiple sub-modules.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
Furthermore, some of the described embodiments are described herein as a method or combination of method elements that can be performed by a processor of a computer system or by other means of performing the described functions. A processor having the necessary instructions for carrying out the method or method elements thus forms a means for carrying out the method or method elements. Further, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is used to implement the functions performed by the elements for the purpose of carrying out the invention.
As used herein, unless otherwise specified the use of the ordinal adjectives "first", "second", "third", etc., to describe a common object, merely indicate that different instances of like objects are being referred to, and are not intended to imply that the objects so described must be in a given sequence, either temporally, spatially, in ranking, or in any other manner.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this description, will appreciate that other embodiments can be devised which do not depart from the scope of the invention as described herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the appended claims. The present invention has been disclosed in an illustrative rather than a restrictive sense, and the scope of the present invention is defined by the appended claims.

Claims (8)

1. A mail searching method is executed on a mailbox client side in a computing device and comprises the following steps:
receiving a search request, and determining search information and a search directory according to the search request, wherein the search directory comprises one or more file directories;
determining the total number of mails included in the search directory, and judging whether the total number of the mails is greater than a first threshold value;
if the total number of mails is determined to be greater than the first threshold, creating a thread pool comprising one or more threads;
traversing each file directory included in the search directory, determining the number of mails included in the file directory for each file directory included in the search directory, and determining the number of task objects to be created according to the number of the mails;
creating a corresponding number of task objects, and allocating one or more mails under the file directory for each task object, wherein if the number of mails is greater than a second threshold value, the number of task objects is determined based on the number of mails and the second threshold value, and after the corresponding number of task objects are created, allocating a second threshold number of mails for each task object;
processing each task object by utilizing the threads in the thread pool according to the search information to obtain a target mail in each task object; and
and generating a search result list according to the target mails in each task object and displaying the search result list.
2. The method of claim 1, wherein the processing each task object according to the search information comprises:
judging whether the content of each mail in the task object comprises search information or not;
and if the search information is included, determining the mail as the target mail.
3. The method of claim 1, wherein the step of determining the number of task objects to be created based on the number of mails comprises:
judging whether the number of the mails is larger than a second threshold value;
if the mail is not larger than the second threshold value, a task object is created, and all mails under the file directory are distributed to the task object.
4. The method of any of claims 1-3, wherein creating a thread pool comprising one or more threads comprises:
acquiring hardware information of the computing equipment, and determining the number of threads according to the hardware information to create a corresponding number of threads.
5. The method of claim 4, wherein determining a number of threads from the hardware information comprises: determining the number of threads according to the number of the CPU cores;
the formula for determining the number of threads according to the number of CPU cores is K = M/2, where K represents the number of threads and M represents the number of CPU cores.
6. A method according to any one of claims 1-3, further comprising the step of:
if it is determined that the total number of mail pieces is not greater than the first threshold value:
traversing each mail under each file directory included in the search directory to judge whether the content of each mail comprises search information;
if the search information is included, determining the mail as a target mail;
and generating a search result list according to each target mail and displaying the search result list.
7. A computing device, comprising:
at least one processor; and
a memory storing program instructions, wherein the program instructions are configured to be adapted to be executed by the at least one processor, the program instructions comprising instructions for performing the method of any of claims 1-6.
8. A readable storage medium storing program instructions that, when read and executed by a computing device, cause the computing device to perform the method of any of claims 1-6.
CN202110397746.0A 2021-04-14 2021-04-14 Mail searching method and computing device Active CN112800318B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110699375.1A CN113343070A (en) 2021-04-14 2021-04-14 Mail searching method and computing device
CN202110397746.0A CN112800318B (en) 2021-04-14 2021-04-14 Mail searching method and computing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110397746.0A CN112800318B (en) 2021-04-14 2021-04-14 Mail searching method and computing device

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202110699375.1A Division CN113343070A (en) 2021-04-14 2021-04-14 Mail searching method and computing device

Publications (2)

Publication Number Publication Date
CN112800318A CN112800318A (en) 2021-05-14
CN112800318B true CN112800318B (en) 2021-07-16

Family

ID=75811329

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202110699375.1A Pending CN113343070A (en) 2021-04-14 2021-04-14 Mail searching method and computing device
CN202110397746.0A Active CN112800318B (en) 2021-04-14 2021-04-14 Mail searching method and computing device

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202110699375.1A Pending CN113343070A (en) 2021-04-14 2021-04-14 Mail searching method and computing device

Country Status (1)

Country Link
CN (2) CN113343070A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112632363A (en) * 2020-12-18 2021-04-09 深圳前海微众银行股份有限公司 Method, device and equipment for processing batch query requests and readable storage medium

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130091266A1 (en) * 2011-10-05 2013-04-11 Ajit Bhave System for organizing and fast searching of massive amounts of data
CN103353892A (en) * 2013-07-05 2013-10-16 北京东方网信科技股份有限公司 Method and system for data cleaning suitable for mass storage
CN104579921B (en) * 2014-12-27 2019-12-13 宁波江东恒冠信息技术有限公司 Method and device for loading e-mail
KR101678168B1 (en) * 2015-03-13 2016-11-21 네이버 주식회사 Mail service system and method for effective mail search
CN105843886A (en) * 2016-03-21 2016-08-10 国电南瑞科技股份有限公司 Multi-thread based power grid offline model data query method
US20180285414A1 (en) * 2017-04-03 2018-10-04 Ocient, Inc Database management system cluster node subtasking data query
US11068256B2 (en) * 2019-01-08 2021-07-20 Bank Of Montreal Systems and methods for pushing firmware binaries using nested multi-threader operations
CN110275985A (en) * 2019-06-26 2019-09-24 银河水滴科技(北京)有限公司 A kind of processing method and processing unit of video frequency searching task
CN112286878A (en) * 2019-07-24 2021-01-29 腾讯科技(深圳)有限公司 File scanning method, device, terminal and storage medium
CN110837553B (en) * 2019-10-12 2023-08-22 中国平安财产保险股份有限公司 Method for searching mail and related products

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112632363A (en) * 2020-12-18 2021-04-09 深圳前海微众银行股份有限公司 Method, device and equipment for processing batch query requests and readable storage medium

Also Published As

Publication number Publication date
CN113343070A (en) 2021-09-03
CN112800318A (en) 2021-05-14

Similar Documents

Publication Publication Date Title
CN111651464B (en) Data processing method, system and computing device
CN113329069B (en) Instant messaging method, system and computing device
US8171228B2 (en) Garbage collection in a cache with reduced complexity
CN111343288B (en) Job scheduling method and system and computing device
CN111563024A (en) Method and device for monitoring container process on host machine and computing equipment
CN110659287A (en) Method for processing field names of table and computing equipment
CN112000417A (en) Control method for window display effect and computing device
CN112800318B (en) Mail searching method and computing device
CN113688617A (en) Method for generating table page and computing equipment
CN110784553B (en) Message encapsulation method, device and domain name resolution system
CN111813902B (en) Intelligent response method, system and computing device
CN113377289A (en) Cache management method, system, computing device and readable storage medium
CN113946430B (en) Job scheduling method, computing device and storage medium
CN111581492A (en) Content recommendation method, computing device and readable storage medium
CN107766537B (en) Position searching and sorting method and computing device
US10171687B2 (en) Providing content and attachment printing for communication
CN112883307B (en) Cache updating method and device and social network system
CN110516169B (en) Data display method, device and system and computing equipment
CN111444448B (en) Data processing method, server and system
CN107688613B (en) Data packet processing rule optimization method and computing device
CN114371798A (en) Picture display method and computing device
CN112181516A (en) Application software execution method and computing device
CN113656347B (en) File directory export method, file directory import method and computing device
CN114338390B (en) Server configuration method, computing device and storage medium
CN114884974B (en) Data multiplexing method, system and computing device

Legal Events

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