Mail operation method and electronic device
By using linked lists to store email data in the email client and server side, the problem of low synchronization efficiency between the email client and the server side is solved, and the rapid retrieval of new emails and the location of deleted emails is realized, which improves the performance and user experience of the email client.
Patent Information
- Application Number
- CN202411756154.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2044-12-02
AI Technical Summary
When the email client performs operations such as querying the latest emails from the server and deleting emails, due to the low efficiency of data synchronization with the server, it is impossible to quickly determine whether there are new emails on the server, and it is impossible to quickly locate the emails that need to be deleted on the server, resulting in poor performance of the email client.
Both the email client and server store the identification number of each email, the identification number of the email, the identification number of the previous email of the email, and the identification number of the next email of the email in the form of a linked list. By looking for the email identification number stored in the linked list, quickly search for whether there are new emails on the server and quickly locate the emails that need to be deleted.
It has achieved the improvement of data synchronization efficiency between the mail client and the server, improved the performance of the mail client, and improved the user experience.
Smart Images

Figure CN119232697B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a mail operation method and electronic device. Background Art
[0002] There are some common operations in the email client, such as querying the latest email from the server and deleting emails. These operations require data synchronization between the email client and the server. In the prior art, when the email client performs the above operations, the data synchronization efficiency between the email client and the server is relatively low, and it is impossible to quickly determine whether there are new emails on the server, and it is impossible to quickly locate the emails to be deleted on the server, resulting in poor performance of the email client, which in turn affects the user experience.
[0003] To address the above problems, no effective solution has been proposed yet. Summary of the invention
[0004] An email operation method and electronic device provided in an embodiment of the present application at least solve the problem that when an email client executes operations such as querying the latest email from a server and deleting emails, the email client cannot quickly determine whether there are new emails on the server, and cannot quickly locate emails to be deleted on the server due to low data synchronization efficiency between the server. This leads to poor performance of the email client.
[0005] According to one aspect of an embodiment of the present application, a method for operating an email is provided, comprising: receiving an instruction sent by an email client to operate a target email; in response to the instruction, searching for the target email in a linked list on a server, wherein each email is stored in the form of a linked list in both the server and the email client, and each node in the linked list is used to store an email, an identification number of the email, an identification number of the previous email, and an identification number of the next email; and performing an operation corresponding to the instruction on the target email.
[0006] Optionally, if the instruction is to obtain a new email from the server, searching for the target email in the linked list stored on the server includes: obtaining the first email identification number stored in the tail node of the linked list sent by the email client; comparing the second email identification number stored in the tail node of the linked list on the server with the first email identification number; if the first email identification number is the same as the second email identification number, determining that no new email is stored in the server; if the first email identification number is different from the second email identification number, determining that a new email is stored in the server, and determining the new email as the target email.
[0007] Optionally, the operation corresponding to the instruction is executed on the target email, including: searching for the corresponding email in the linked list of the server according to the first email identification number; determining the identification of the next email in the node storing the email corresponding to the first email identification number as the identification number of the target email; searching for the target email in the linked list of the server according to the identification number of the target email; and sending the target email and the identification number of the target email to the email client.
[0008] Optionally, after sending the target email and the identification number of the target email to the email client, the above method also includes: the email client modifies the identification number of the next email in the node storing the first email identification number in its linked list to the identification number of the target email; the email client inserts the target email and the identification number of the target email into its linked list, and modifies the identification number of the previous email in the node storing the target email to the first email identification number.
[0009] Optionally, if the instruction is to delete the target email from the server, the operation corresponding to the instruction is performed on the target email, including: searching for the previous copy of the target email in the linked list on the server, and modifying the data in the node in the linked list on the server for storing the previous copy of the target email; searching for the next copy of the target email in the linked list on the server, and modifying the data in the node in the linked list on the server for storing the next copy of the target email; deleting the target email in the linked list on the server.
[0010] Optionally, the previous copy of the target email is searched in a linked list on the server side, and the data in the node in the linked list on the server side that is used to store the previous copy of the target email is modified, including: searching for the identification number of the previous copy of the target email in the node that stores the target email in the linked list on the server side; determining the previous copy of the target email based on the identification number of the previous copy of the target email; and modifying the identification number of the next email stored in the node that stores the previous copy of the target email from the identification number of the target email to the identification number of the next email stored in the node that stores the target email.
[0011] Optionally, the next copy of the target email is searched in the linked list of the server, and the data in the node for storing the next copy of the target email in the linked list of the server is modified, including: searching for the identification number of the next copy of the target email in the node for storing the target email in the linked list of the server; determining the next copy of the target email according to the identification number of the next copy of the target email; and modifying the identification number of the previous copy of the email stored in the node for storing the next copy of the target email from the identification number of the target email to the identification number of the previous copy of the email stored in the node for storing the target email.
[0012] According to another aspect of an embodiment of the present application, another method for operating emails is provided, including: sending an instruction to obtain new emails and a first email identification number stored in the tail node of a linked list of an email client to a server, wherein the server and the email client store each email in the form of a linked list, and each node in the linked list is used to store an email, an email identification number, an identification number of the previous email, and an identification number of the next email; receiving a target email and an identification number of the target email sent by the server, wherein the target email is a new email.
[0013] Optionally, after receiving the target email and the identification number of the target email sent by the server, the above method also includes: modifying the identification number of the next email in the node storing the first email identification number in the linked list of the email client to the identification number of the target email; inserting the target email and the identification number of the target email into the linked list, and modifying the identification number of the previous email in the node storing the target email to the first email identification number.
[0014] According to another aspect of an embodiment of the present application, another method for operating an email is provided, including: sending an instruction to delete a target email to a server, wherein the server and the email client both store each email in the form of a linked list, and each node in the linked list is used to store an email, an email identification number, an identification number of the previous email, and an identification number of the next email; searching for the previous email of the target email in the linked list of the email client, and modifying the data in the node in the linked list of the email client for storing the previous email of the target email; searching for the next email of the target email in the linked list of the email client, and modifying the data in the node in the linked list of the email client for storing the next email of the target email; and deleting the target email in the linked list of the email client.
[0015] Optionally, searching for the previous copy of the target email in a linked list of the email client, and modifying the data in the node in the linked list of the email client that is used to store the previous copy of the target email, including: searching for the identification number of the previous copy of the target email in the node that stores the target email in the linked list of the email client; determining the previous copy of the target email based on the identification number of the previous copy of the target email; and modifying the identification number of the next email stored in the node that stores the previous copy of the target email from the identification number of the target email to the identification number of the next email stored in the node that stores the target email.
[0016] Optionally, searching for the next copy of the target email in a linked list of the email client, and modifying the data in a node in the linked list of the email client for storing the next copy of the target email, including: searching for an identification number of the next copy of the target email in the node storing the target email in the linked list of the email client; determining the next copy of the target email according to the identification number of the next copy of the target email; and modifying the identification number of the previous copy of the email stored in the node storing the next copy of the target email from the identification number of the target email to the identification number of the previous copy of the email stored in the node storing the target email.
[0017] According to another aspect of the embodiments of the present application, there is also provided an electronic device, including: a processor, and a memory storing a program, wherein the program includes instructions, and when the instructions are executed by the processor, the processor executes the above method.
[0018] According to another aspect of the embodiments of the present application, a non-transitory machine-readable medium storing computer instructions is also provided, where the computer instructions are used to enable a computer to execute the above method.
[0019] Beneficial effects of the embodiments of the present application:
[0020] In an embodiment of the present application, by storing each email, the email identification number, the identification number of the previous email, and the identification number of the next email in the form of a linked list in both the email client and the server, when the email client performs an operation of searching for new emails or deleting emails, it searches the email identification number stored in the linked list, thereby achieving the purpose of quickly searching whether there are new emails on the server and quickly locating emails that need to be deleted, thereby achieving the technical effect of improving the data synchronization efficiency between the email client and the server and improving the performance of the email client.
[0021] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can be obtained based on these drawings without creative work.
[0023] Figure 1 is a flow chart of an email operation method according to an embodiment of the present application;
[0024] Figure 2It is a schematic diagram of the structure of a link list in an email client and a server according to an embodiment of the present application;
[0025] Figure 3 is a flowchart of another email operation method according to an embodiment of the present application;
[0026] Figure 4 is a flowchart of another email operation method according to an embodiment of the present application;
[0027] Figure 5 Schematic diagram of the structure of the electronic device of this embodiment. DETAILED DESCRIPTION
[0028] Embodiments of the present embodiment will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present embodiment are shown in the accompanying drawings, it should be understood that the present embodiment can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein, which are instead provided for a more thorough and complete understanding of the present embodiment. It should be understood that the drawings and embodiments of the present embodiment are only for exemplary purposes and are not intended to limit the scope of protection of the present embodiment.
[0029] In order to better understand the embodiments of the present application, the technical terms involved in the embodiments of the present application are explained as follows:
[0030] Linked list: is a common data structure, which consists of a series of nodes, each node contains a data part and a reference (i.e. pointer) to the next node. The main feature of the linked list is its dynamic nature, which allows easy insertion and deletion of elements without reallocating memory or moving large amounts of data like an array.
[0031] Node: Each element in a linked list is called a node. A node usually consists of two parts: a data field and a pointer field. The data field is used to store actual data. The pointer field is used to store a pointer to the next node.
[0032] Head node: The first node of a linked list, usually accessed through a pointer (such as head).
[0033] Tail node: The last node of a linked list, whose pointer field is usually NULL.
[0034] Doubly linked list: Each node has two pointer fields, one pointing to the previous node and the other pointing to the next node. It can be traversed in both directions, and the insertion and deletion operations are more flexible.
[0035] In the related art, when the mail client performs the above operations, the data synchronization efficiency between the mail client and the server is relatively low, and it is impossible to quickly determine whether there are new mails on the server, and it is impossible to quickly locate the mails to be deleted on the server, resulting in poor performance of the mail client, which in turn affects the user experience. In order to solve this problem, the embodiments of the present application provide a related solution, which is described in detail below.
[0036] Figure 1 is a flowchart of an email operation method according to an embodiment of the present application, such as Figure 1 As shown, the method comprises the following steps:
[0037] Step S102: receiving an instruction sent by the mail client to operate the target mail.
[0038] An email client is a software application used to send, receive, and manage emails. It provides a user interface that enables users to easily interact with an email server.
[0039] According to an optional embodiment of the present application, the above instructions include but are not limited to operations such as querying and obtaining new emails from the server and deleting emails.
[0040] In this step, the execution subject is the server, which receives instructions sent by the mail client to perform relevant operations on the target mail.
[0041] Step S104, in response to the instruction, searching for the target email in the linked list of the server, wherein each email is stored in the form of a linked list in both the server and the email client, and each node in the linked list is used to store an email, an identification number of the email, an identification number of the previous email, and an identification number of the next email.
[0042] In an embodiment of the present application, the mail client and the server both store each mail in the form of a linked list, and use the SM3 algorithm to calculate the unique identifier of the mail, Mail ID; and record the ID of the previous mail and the ID of the next mail of this mail.
[0043] SM3 algorithm is a cryptographic hash function, the full name is "National Cryptography Administration Announcement No. 3 Cryptographic Hash Algorithm". It is a one-way cryptographic system that can only perform encryption process but no decryption process. The main function of SM3 algorithm is to convert input data of any length into output data of fixed length, usually a 256-bit hash value. The calculation process of this hash value is irreversible, which means that the original input data cannot be restored from the hash value.
[0044] Figure 2is a schematic diagram of the structure of a link list in a mail client and a server according to an embodiment of the present application, such as Figure 2 As shown, both the email client and the server store data in the form of linked lists. The data field of each node in the double linked list is used to store the email body and the identification ID of the email, and the two pointer fields of each node are used to store the identification ID of the previous email and the identification ID of the next email.
[0045] Step S106: executing the operation corresponding to the instruction on the target email.
[0046] The above method provided in the embodiment of the present application stores each email, the email identification number, the identification number of the previous email, and the identification number of the next email in the form of a linked list in the email client and the server. When the email client performs the operation of searching for new emails or deleting emails, it searches the email identification number stored in the linked list, thereby achieving the purpose of quickly searching whether there are new emails on the server and quickly locating the emails that need to be deleted, thereby achieving the technical effect of improving the data synchronization efficiency between the email client and the server and improving the performance of the email client.
[0047] According to an optional embodiment of the present application, if the instruction is to obtain a new email from the server, step S104 is executed to search for the target email in the linked list stored on the server, including the following steps: obtaining the first email identification number stored in the tail node of the linked list sent by the email client; comparing the second email identification number stored in the tail node of the linked list on the server with the first email identification number; if the first email identification number is the same as the second email identification number, determining that no new email is stored in the server; if the first email identification number is different from the second email identification number, determining that a new email is stored in the server, and determining the new email as the target email.
[0048] Whether it is the email client or the server, the latest email is stored in the tail node of the linked list. Therefore, when the email client queries and obtains new emails from the server, it uses the email ID (latest email) stored in the tail node of the linked list to ask the server. The server compares the email ID stored in the tail node of its linked list with the email ID sent by the email client. If the two are the same, the server has no new email; if the two are different, the server has new email. If the server has new emails, the server needs to push the new emails to the client.
[0049] like Figure 2 As shown, the email client uses the latest email ID number 4 recorded in Table 1 to query the server whether there is a new email. The server compares the latest email ID number 5 recorded in Table 1 with the email ID number 4 sent by the client. If the two are different, it means that the server has a new email.
[0050] According to another optional embodiment of the present application, step S106 is executed to execute the operation corresponding to the instruction on the target email, including the following steps: searching for the corresponding email in the linked list on the server side according to the first email identification number; determining the identification of the next email in the node storing the email corresponding to the first email identification number as the identification number of the target email; searching for the target email in the linked list on the server side according to the identification number of the target email; and sending the target email and the identification number of the target email to the email client.
[0051] The server queries the corresponding email stored on the server according to the email identification ID sent by the email client (i.e. the first email identification number mentioned above); the server queries the next email according to the ID of the next email pointed to by the corresponding email; the server returns the body and ID of the next email to the email client.
[0052] like Figure 2 As shown, the server searches for the corresponding email according to the latest email ID 4 of the email client. The node recording the email also records the ID 5 of the next email. The next email (the target email mentioned above, i.e. the latest email of the server) is found according to the ID 5 of the next email, and then the server returns the email with ID 5 to the email client.
[0053] As some optional embodiments of the present application, after sending the target email and the identification number of the target email to the email client, the email client modifies the identification number of the next email in the node storing the first email identification number in its linked list to the identification number of the target email; the email client inserts the target email and the identification number of the target email into its linked list, and modifies the identification number of the previous email in the node storing the target email to the identification number of the first email.
[0054] After receiving the latest email returned by the server, the email client inserts the new email body and the new email ID into the linked list, updates the linked list, and modifies the Next Email field in the node storing the original email to point to the ID of the new email (i.e. the ID of the target email mentioned above). The Previous Email field in the node storing the new email is modified to point to the ID of the original email (i.e. the ID of the first email mentioned above).
[0055] like Figure 2 As shown, after receiving the email with email ID 5 (hereinafter referred to as email No. 5), the email client modifies the node storing email No. 4, and changes the ID of the next email stored therein to 5. Then, the email client inserts email No. 5 and changes the ID of the previous email in the node storing email No. 5 to 4. Finally, the email client updates the ID of the latest email to 5. Through the above series of steps, the email client completes a process of querying and obtaining new emails from the server.
[0056] like Figure 2 As shown, the latest email ID on the server is 8. Similarly, the email client uses email No. 5 to query the server for new emails. The logic is the same as querying email No. 4 and inserting email No. 5. Until the email client obtains email No. 8 from the server, the entire query process ends.
[0057] According to an optional embodiment of the present application, if the instruction is to delete the target email from the server, execute step S106 to perform the operation corresponding to the instruction on the target email, including the following steps: search for the previous copy of the target email in the linked list of the server, and modify the data in the node in the linked list of the server for storing the previous copy of the target email; search for the next copy of the target email in the linked list of the server, and modify the data in the node in the linked list of the server for storing the next copy of the target email; delete the target email in the linked list of the server.
[0058] When the email client sends an instruction to the server to delete an email, the email client sends the email identification ID to be deleted to the server. The server queries the corresponding email based on the email identification ID, and then queries the next email and the previous email based on the corresponding email, and modifies the data in the nodes storing the next email and the previous email respectively.
[0059] As an optional embodiment of the present application, searching for the previous copy of the target email in a linked list on the server side, and modifying the data in the node in the linked list on the server side for storing the previous copy of the target email, is achieved by the following method: searching for the identification number of the previous copy of the target email in the node storing the target email in the linked list on the server side; determining the previous copy of the target email based on the identification number of the previous copy of the target email; and modifying the identification number of the next email stored in the node storing the previous copy of the target email from the identification number of the target email to the identification number of the next email stored in the node storing the target email.
[0060] like Figure 2 As shown in the figure, the email client wants to delete email No. 2. The server finds the corresponding email based on email ID 2, and then finds the previous email of email No. 2 (i.e., email No. 1). The ID of the next email in the node storing email No. 1 is changed from 2 to 3 (because email No. 2 no longer exists after it is deleted).
[0061] As an optional embodiment of the present application, searching for the next copy of the target email in a linked list on the server side, and modifying the data in the node in the linked list on the server side for storing the next copy of the target email, includes the following steps: searching for the identification number of the next copy of the target email in the node storing the target email in the linked list on the server side; determining the next copy of the target email according to the identification number of the next copy of the target email; and modifying the identification number of the previous copy of the email stored in the node storing the next copy of the target email from the identification number of the target email to the identification number of the previous copy of the email stored in the node storing the target email.
[0062] like Figure 2 As shown in the figure, the email client wants to delete email No. 2. The server finds the corresponding email based on email ID 2, and then finds the next email of email No. 2 (i.e., email No. 3). The ID of the previous email in the node storing email No. 3 is changed from 2 to 1 (because email No. 2 no longer exists after it is deleted). Finally, email No. 2 is deleted on the server.
[0063] The above solution proposed in this application can quickly retrieve whether there are new emails on the email server and quickly locate and delete emails, which greatly improves the performance of the email client.
[0064] Figure 3 is a flowchart of another email operation method according to an embodiment of the present application. Figure 3 As shown, the method comprises the following steps:
[0065] Step S302, sending an instruction to obtain a new email and the first email identification number stored in the tail node of the linked list of the email client to the server, wherein the server and the email client both store each email in the form of a linked list, and each node in the linked list is used to store an email, an email identification number, an identification number of the previous email, and an identification number of the next email.
[0066] Step S304, receiving a target email and an identification number of the target email sent by the server, wherein the target email is a new email.
[0067] According to an optional embodiment of the present application, after executing step S304 to receive the target email and the identification number of the target email sent by the server, the identification number of the next email in the node storing the first email identification number in the linked list of the email client is modified to the identification number of the target email; the target email and the identification number of the target email are inserted into the linked list, and the identification number of the previous email in the node storing the target email is modified to the first email identification number.
[0068] It should be noted that the execution subject of step S302 to step S304 is the mail client. Figure 3The illustrated embodiment shows the steps performed by the email client in the process of querying and obtaining new emails from the server. Figure 3 The preferred implementation of the embodiment shown can be referred to Figure 1 The relevant description of the illustrated embodiment will not be repeated here.
[0069] Figure 4 is a flowchart of another email operation method according to an embodiment of the present application. Figure 4 As shown, the method comprises the following steps:
[0070] Step S402, sending an instruction to delete the target email to the server, wherein the server and the email client store each email in the form of a linked list, and each node in the linked list is used to store an email, an email identification number, an identification number of the previous email, and an identification number of the next email.
[0071] Step S404: search for the previous copy of the target email in the linked list of the email client, and modify the data in the node for storing the previous copy of the target email in the linked list of the email client.
[0072] Step S406, searching the linked list of the mail client for the next copy of the target mail, and modifying the data in the node for storing the next copy of the target mail in the linked list of the mail client.
[0073] Step S408: Delete the target email from the linked list of the email client.
[0074] According to an optional embodiment of the present application, step S404 is executed to search for the previous copy of the target email in the linked list of the email client, and the data in the node for storing the previous copy of the target email in the linked list of the email client is modified, including the following steps: searching for the identification number of the previous copy of the target email in the node storing the target email in the linked list of the email client; determining the previous copy of the target email based on the identification number of the previous copy of the target email; and modifying the identification number of the next email stored in the node storing the previous copy of the target email from the identification number of the target email to the identification number of the next email stored in the node storing the target email.
[0075] According to an optional embodiment of the present application, step S406 is executed to search for the next copy of the target email in the linked list of the email client, and the data in the node used to store the next copy of the target email in the linked list of the email client is modified, including the following steps: searching for the identification number of the next copy of the target email in the node storing the target email in the linked list of the email client; determining the next copy of the target email according to the identification number of the next copy of the target email; and modifying the identification number of the previous email stored in the node storing the next copy of the target email from the identification number of the target email to the identification number of the previous email stored in the node storing the target email.
[0076] It should be noted that the execution subject of steps S402 to S408 is the mail client. Figure 4 The illustrated embodiment shows the steps performed by the email client during the process of deleting emails. Figure 4 The preferred implementation of the embodiment shown can be referred to Figure 1 The relevant description of the illustrated embodiment will not be repeated here.
[0077] The embodiment of the present application also provides an electronic device, comprising: at least one processor; and a memory connected to the at least one processor in communication. The memory stores a computer program executable by the at least one processor, and the computer program is used to enable the electronic device to perform the method of the embodiment of the present application when executed by the at least one processor.
[0078] An embodiment of the present application also provides a non-transitory machine-readable medium storing a computer program, wherein the computer program, when executed by a processor of a computer, is used to cause the computer to execute the method of the embodiment of the present application.
[0079] The embodiment of the present application also provides a computer program product, including a computer program, wherein the computer program, when executed by a processor of a computer, is used to cause the computer to execute the method of the embodiment of the present application.
[0080] refer to Figure 5 , the structural block diagram of the electronic device that can be used as the server or client of the embodiment of the present application will now be described, which is an example of the hardware device that can be applied to various aspects of the present application. The electronic device is intended to represent various forms of digital electronic computer equipment, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices and other similar computing devices. The components shown herein, their connections and relationships, and their functions are only examples, and are not intended to limit the implementation of the present application described and / or required herein.
[0081] like Figure 5 As shown, the electronic device includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 to a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0082] Multiple components in the electronic device are connected to the I / O interface 505, including: an input unit 506, an output unit 507, a storage unit 508, and a communication unit 509. The input unit 506 can be any type of device that can input information to the electronic device, and the input unit 506 can receive input digital or character information, and generate key signal input related to user settings and / or function control of the electronic device. The output unit 507 can be any type of device that can present information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 508 can include but is not limited to a disk, an optical disk. The communication unit 509 allows the electronic device to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and can include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0083] The computing unit 501 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a CPU, a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 501 performs the various methods and processes described above. For example, in some embodiments, the method embodiments of the present application may be implemented as a computer program, which is tangibly contained in a machine-readable medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on an electronic device via a ROM 502 and / or a communication unit 509. In some embodiments, the computing unit 501 may be configured to perform the above-described method in any other appropriate manner (e.g., by means of firmware).
[0084] The computer program for implementing the method of the embodiment of the present application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0085] In the context of the embodiments of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or apparatus. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable signal medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, or infrared system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0086] It should be noted that the term "including" and its variations used in the embodiments of the present application are open inclusions, that is, "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". The modifications of "one" and "multiple" mentioned in the embodiments of the present application are illustrative and not restrictive. Those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0087] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of the present application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0088] The various steps described in the method implementation methods provided in the embodiments of the present application can be performed in different orders and / or in parallel. In addition, the method implementation methods may include additional steps and / or omit the steps shown. The scope of protection of the present application is not limited in this respect.
[0089] The term "embodiment" in this specification refers to specific features, structures or characteristics described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. The various embodiments in this specification are described in a related manner, and the same or similar parts between the various embodiments refer to each other. In particular, for the device, equipment, and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts refer to the partial description of the method embodiment.
[0090] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of patent protection. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.
Claims
1. A mail operation method, characterized in that: include: Receive instructions sent by the mail client to operate the target mail; In response to the instruction, searching for the target email in a linked list of the server, wherein each email is stored in the form of a linked list in both the server and the email client, and each node in the linked list is used to store an email, an identification number of the email, an identification number of a previous email of the email, and an identification number of a next email of the email; If the instruction is to obtain a new email from the server, searching for the target email in the linked list stored in the server includes: obtaining the first email identification number stored in the tail node of the linked list sent by the email client; comparing the second email identification number stored in the tail node of the linked list on the server with the first email identification number; if the first email identification number is the same as the second email identification number, determining that no new email is stored in the server; if the first email identification number is different from the second email identification number, determining that a new email is stored in the server, and determining the new email as the target email; Execute the operation corresponding to the instruction on the target email; Executing the operation corresponding to the instruction on the target email, including: searching for the corresponding email in the linked list of the server according to the first email identification number; determining the identification of the next email in the node storing the email corresponding to the first email identification number as the identification number of the target email; searching for the target email in the linked list of the server according to the identification number of the target email; sending the target email and the identification number of the target email to the email client.
2. The method according to claim 1, characterized in that After sending the target email and the identification number of the target email to the email client, the method further includes: The mail client modifies the identification number of the next mail in the node storing the first mail identification number in its linked list to the identification number of the target mail; The mail client inserts the target mail and the identification number of the target mail into its linked list, and modifies the identification number of the previous mail in the node storing the target mail to the first mail identification number.
3. The method according to claim 1, characterized in that If the instruction is to delete the target email from the server, performing an operation corresponding to the instruction on the target email includes: Searching for the previous email of the target email in the linked list of the server, and modifying the data in the node in the linked list of the server for storing the previous email of the target email; Searching for the next email of the target email in the linked list of the server, and modifying the data in the node in the linked list of the server for storing the next email of the target email; The target email is deleted from the linked list of the server.
4. The method according to claim 3, characterized in that Searching for the previous email of the target email in the linked list of the server, and modifying the data in the node in the linked list of the server for storing the previous email of the target email, including: Searching for the identification number of the previous email of the target email in the node storing the target email in the linked list of the server; Determine the previous email of the target email according to the identification number of the previous email of the target email; The identification number of the next mail stored in the node storing the previous mail of the target mail is modified from the identification number of the target mail to the identification number of the next mail stored in the node storing the target mail.
5. The method according to claim 3, characterized in that: Searching for the next email of the target email in the linked list of the server, and modifying the data in the node in the linked list of the server for storing the next email of the target email, including: Searching for the identification number of the next email of the target email in the node storing the target email in the linked list of the server; Determine the next mail of the target mail according to the identification number of the next mail of the target mail; The identification number of the previous mail stored in the node storing the next mail of the target mail is modified from the identification number of the target mail to the identification number of the previous mail stored in the node storing the target mail.
6. A mail operation method, characterized in that: include: Sending an instruction to delete a target email to a server, wherein each email is stored in a linked list in both the server and the email client, and each node in the linked list is used to store an email, an identification number of the email, an identification number of the previous email of the email, and an identification number of the next email of the email; Searching for the previous copy of the target email in the linked list of the email client, and modifying the data in the node in the linked list of the email client for storing the previous copy of the target email; Searching for the previous copy of the target email in the linked list of the email client, and modifying the data in the node in the linked list of the email client for storing the previous copy of the target email, including: searching for the identification number of the previous copy of the target email in the node storing the target email in the linked list of the email client; determining the previous copy of the target email according to the identification number of the previous copy of the target email; modifying the identification number of the next email stored in the node storing the previous copy of the target email from the identification number of the target email to the identification number of the next email stored in the node storing the target email; Searching for the next email of the target email in the linked list of the email client, and modifying the data in the node in the linked list of the email client for storing the next email of the target email; Searching for the next copy of the target email in the linked list of the email client, and modifying the data in the node in the linked list of the email client for storing the next copy of the target email, including: searching for the identification number of the next copy of the target email in the node storing the target email in the linked list of the email client; determining the next copy of the target email according to the identification number of the next copy of the target email; modifying the identification number of the previous copy of the email stored in the node storing the next copy of the target email from the identification number of the target email to the identification number of the previous copy of the email stored in the node storing the target email; The target email is deleted from the linked list of the email client.
7. An electronic device comprising: A processor and a memory storing a program, wherein the program comprises instructions, which, when executed by the processor, cause the processor to perform the method according to any one of claims 1 to 6.
8. A non-transitory machine-readable medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method for filing mail attachments, and cloud storage server
CN105450513A
Closing method of opened file, computer equipment and storage medium
CN111737201A