Mail picture management method and device, equipment and medium
By differentiating images based on their source and tag attributes, images are transferred to the file system and their tag attributes are updated, thus solving the problem of slow display when managing large images on the web and improving management efficiency.
Patent Information
- Application Number
- CN202511342251.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-19
- Publication Date
- 2026-01-13
AI Technical Summary
When managing images with large sizes or large file sizes on a web page, existing technology causes slow browser loading, resulting in inefficient email management.
Based on the image's source and tag attributes, different upload and synchronization strategies are adopted. The images are first transferred to a preset file system and the tag attributes are updated to manage the images on the web page in a unified way.
It improves the efficiency of image management on the web, reduces the probability of upload and synchronization failures, and ensures smooth image management on the web.
Smart Images

Figure CN121334104A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of financial technology, and in particular to a method, apparatus, device, and medium for managing email images. Background Technology
[0002] For the vast majority of businesses and users, email is an indispensable part of their daily work, and email management has become one of the research directions for technical personnel in related fields.
[0003] When emails contain images with large physical dimensions or file sizes, their display on the web browser can be very slow, especially when editing large images in a rich text editor, which can easily cause lag and result in poor efficiency when managing emails with images on the web. Summary of the Invention
[0004] This application provides a method, apparatus, device, and medium for managing email images, in order to improve the efficiency of email image management.
[0005] According to one aspect of this application, an email image management method is provided, comprising:
[0006] Obtain the target image and its management type;
[0007] In response to the management type of web-based upload, the upload strategy is determined based on the image source of the target image;
[0008] In response to the management type being web-based synchronization, the synchronization strategy is determined based on the image tag attributes of the target image;
[0009] Manage target images according to upload or synchronization strategies.
[0010] According to another aspect of this application, an email image management device is provided, comprising:
[0011] The management type acquisition module is used to acquire the target image and its management type.
[0012] The first strategy determination module is used to determine the upload strategy based on the image source of the target image in response to web-based uploads.
[0013] The second strategy determination module is used to determine the synchronization strategy based on the image tag attributes of the target image in response to the management type of web-based synchronization.
[0014] The target image management module is used to manage target images according to upload or synchronization strategies.
[0015] According to another aspect of this application, an electronic device is provided, the electronic device comprising:
[0016] At least one processor; and
[0017] A memory communicatively connected to the at least one processor; wherein,
[0018] The memory stores a computer program that can be executed by the at least one processor, which is then executed by the at least one processor to enable the at least one processor to perform the email image management method described in any embodiment of this application.
[0019] According to another aspect of this application, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the email image management method described in any embodiment of this application.
[0020] According to another aspect of this application, a computer program product is provided, the computer program product including a computer program that, when executed by a processor, implements the email image management method according to any embodiment of this application.
[0021] In the technical solution of this application embodiment, different management types of target images are processed separately, which can differentiate processing for different management purposes and improve the adaptability of image management. When the management type is web-based upload, the upload strategy is determined based on the image source of the target image, which can adopt different upload strategies for different image sources and flexibly manage the upload of images to the web. When the management type is web-based synchronization, the synchronization strategy is determined based on the image tag attributes of the target image, which can adopt different synchronization strategies for different information recorded in the image tag attributes and flexibly manage the synchronization of images to the web. In this way, image management on the web can manage different strategies for different situations of the image itself, which can effectively ensure that the image is successfully uploaded and synchronized on the web, reduce the probability of upload or synchronization failure, and improve the efficiency of image management in the web-based email management system.
[0022] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a flowchart of an email image management method according to Embodiment 1 of this application;
[0025] Figure 2A This is a flowchart of an email image management method according to Embodiment 2 of this application;
[0026] Figure 2B This is a schematic diagram illustrating the uploading and management of images to a web page according to Embodiment 2 of this application;
[0027] Figure 2C This is a schematic diagram illustrating the synchronization of images to a web page for management according to Embodiment 2 of this application;
[0028] Figure 3 This is a schematic diagram of the structure of an email image management device according to Embodiment 3 of this application;
[0029] Figure 4 This is a schematic diagram of the structure of an electronic device that implements the email image management method of the embodiments of this application. Detailed Implementation
[0030] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0031] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0032] Example 1
[0033] Figure 1 This application provides a flowchart of an email image management method according to Embodiment 1. This embodiment is applicable to managing large images within web-based emails. The method can be executed by an email image management device, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method includes:
[0034] S110. Obtain the target image and the management type of the target image.
[0035] The target image can be any image that needs to be managed. The management type of the target image can be a specific operation performed on the target image, such as uploading or synchronizing an image on a web interface. Uploading can be done from any image source to the web interface for editing; synchronization can occur when emails are synchronized from another email management system to the web interface, allowing for the synchronized management of the target image within the email. It's understandable that the corresponding management type can be obtained as soon as a need for target image management arises.
[0036] It should be noted that, in the current technology, many companies isolate their internal networks from external networks (the Internet) for security reasons. Therefore, when sending emails, images in the body of the email can only be stored in base64 encoding. Currently, the B / S model (Browser / Server) is more popular, and users are more accustomed to using browsers to manage their email accounts and process emails.
[0037] Typically, client-side email management systems and web-based email management systems need to work together. However, these systems may be developed and maintained by different vendors. The client only provides an email synchronization interface, while emails on the web platform need to be synchronized with those on the client. Emails require interoperability between internal and external networks, and all transmitted emails must be fully transmitted. Since internal network URLs (Uniform Resource Locators) are inaccessible from the external network, URLs cannot be used as a medium for email management. For images, attaching them to emails is not intuitive. Furthermore, due to the large physical size or actual file size of images, direct display on a web browser is difficult and slow, easily causing lag when editing in a rich text editor on the web, resulting in poor image management efficiency in web-based emails. Therefore, the embodiments and implementation schemes of this application propose an email image management method that can improve the efficiency of image management in emails while meeting the above requirements.
[0038] S120. In response to the management type of web-based upload, determine the upload strategy based on the image source of the target image.
[0039] Among these, the web-based upload operation type can be a management type that requires uploading images to the web for editing. The image source of the target image can be where the image was uploaded to the web for editing from, i.e., the source of the image upload. The upload strategy can be the upload method where the target image is uploaded from its source to the web for editing.
[0040] When the target image needs to be uploaded to a web platform for editing, different upload methods can be used depending on the image's source. It's understandable that different image sources will result in different image formats, such as different encodings or formats, which will not be listed exhaustively here. Therefore, different upload methods should be used for images from different sources.
[0041] S130. In response to the management type being web-based synchronization, determine the synchronization strategy based on the image tag attributes of the target image.
[0042] The web-based synchronization operation type can refer to the management type of the target image when the target email corresponding to the target image is synchronized from another system (e.g., a client-side email management system) to a web-based email management system. Correspondingly, the synchronization strategy can be the synchronization method for synchronizing the target image to the web interface. Image tag attributes can be tag information recorded in the image file related to the image's own attributes. By querying this information, some inherent content of the image itself can be obtained, such as the image's name, size, source, encoding, and whether it has been re-edited or transcoded. This application embodiment does not limit this aspect.
[0043] When a target image needs to be synchronized from another email management system to the web interface, the image's tag attributes can be read to differentiate between different synchronization methods. It's understandable that different images contain different information in their image tag attributes; therefore, different synchronization methods are used to handle different tag attributes.
[0044] S140. Manage the target images according to the upload strategy or synchronization strategy.
[0045] Based on the upload or synchronization method determined in the preceding steps, upload or synchronize the target image accordingly.
[0046] In the technical solution of this application embodiment, different management types of target images are processed separately, which can differentiate processing for different management purposes and improve the adaptability of image management. When the management type is web-based upload, the upload strategy is determined based on the image source of the target image, which can adopt different upload strategies for different image sources and flexibly upload images to the web. When the management type is web-based synchronization, the synchronization strategy is determined based on the image tag attributes of the target image, which can adopt different synchronization strategies for different information recorded in the image tag attributes and flexibly synchronize images to the web. In this way, image management on the web can manage different strategies for different situations of the image itself, which can effectively ensure that images are successfully uploaded and synchronized on the web, reduce the probability of upload or synchronization failure, and improve the efficiency of image management in the web-based email management system.
[0047] Example 2
[0048] Figure 2A This is a flowchart illustrating an email image management method according to Embodiment 2 of this application. This embodiment further refines the image upload strategy on a webpage, based on the aforementioned embodiments. Figure 2A As shown, the method includes:
[0049] S210. Obtain the target image and the management type of the target image.
[0050] S220. In response to the management type of web-based upload, based on the image source of the target image, save the target image to the preset file system and update the image tag attribute of the target image.
[0051] The preset file system can be a storage and management system specifically for storing attachments in emails. The file system can be any type of server file system, preferably a distributed file system. This application embodiment does not limit the type and implementation of the file system.
[0052] It should be noted that images from different sources can be first transferred to a pre-defined file system, and then the image tag attributes of the target image can be modified through this file system. This transforms the attributes assigned by the image source into attributes assigned by the file system, which facilitates the subsequent unified uploading of the target image to the web platform. Of course, the method of modifying and updating the image tag attributes is not limited in this embodiment of the application.
[0053] S230. Upload the target image with updated image tag attributes to the rich text editor on the web page.
[0054] After modifying the image tag attributes in the aforementioned steps, the target image is uploaded to a rich text editor on the web for subsequent editing and email sending operations.
[0055] S240. In response to web-based synchronization, determine the synchronization strategy based on the image tag attributes of the target image.
[0056] S250. Manage target images according to upload or synchronization strategies.
[0057] In the technical solution of this application embodiment, by transferring images from different sources to a pre-arranged file system and modifying and updating the image tag attributes of the target image through the file system, it is helpful to subsequently upload them to the web in a unified manner, thereby improving the efficiency of the web on-screen client in managing the upload of different images.
[0058] In an optional implementation, the step S220, which involves saving the target image to a preset file system based on the image source and updating the image tag attribute of the target image, may include:
[0059] S221. If the image source is any third-party website, save the target image to the preset file system according to the image link of the target image.
[0060] The third-party website can be any website capable of accessing images. Images on these websites are typically accessible through links on those websites. The image link of the target image can be a link to the image on the source website. It should be noted that this image link refers to a link within the source website, such as an HTTP link.
[0061] The target image can be obtained via an HTTP link and stored directly in a pre-deployed file system. If the third-party website has user permission verification and cannot download or store the image, an error message is generated and sent to the user via the email management system's front end. Of course, this application's embodiments and implementation methods mainly describe how successfully transferred images are managed on the web interface.
[0062] S222. If the image source is a local file, save the target image directly to the file system.
[0063] Local files can be files stored locally on the hardware device (such as a computer) where the user's web browser is located. When the target image is a file stored locally, it can be directly uploaded to the pre-deployed file system.
[0064] S223. Receive the image number of the target image returned by the file system.
[0065] Regardless of the image source, after the image is transferred to a pre-deployed file system, the file system will automatically assign a number to the target image according to the preset rules of the target image in the file system (such as the storage time order), that is, generate the image number.
[0066] S224. Generate the path link of the target image in the file system based on the image number.
[0067] The path link can be a link to the storage path of the target image in a pre-deployed file system. The image number can be used as part of the path link to locate the target image within the file system, facilitating retrieval and retrieval. For example, the path link of the target image in the file system could be:
[0068] http: / / domain / file / download? fileid=XXX;
[0069] Where domain is the domain name of the file system, file is the folder name, download indicates that the target image is downloaded and saved to the file system, fileid is the image number, and XXX is the specific value of the number, which is only for illustration and example.
[0070] S225. Replace the resource tags of the target image with path links to generate the replaced target resource tags.
[0071] The target image itself inherently contains resource tags (such as the src tag) in its image tag attributes. These resource tags are used to mark the source of the target image. Regardless of whether the original source of the target image is a third-party website or a local file, after saving it to the file system, the resource tag in the target image's image tag attributes is replaced with a path link, which becomes the updated target resource tag. Subsequent image management can then directly process the image based on this updated target resource tag. It should be noted that if the target image's image tag attributes do not already include a resource tag indicating the image source, this target resource tag (path link) can be added to the target image's image tag attributes after saving it to the file system.
[0072] S226. Generate a resource type label named after the system name of the file system, and update the image label attributes based on the target resource label and the resource type label.
[0073] The resource type tag can be a new tag added to the image tag attributes of the target image. This resource type tag is used to indicate that the target image is in a pre-arranged file system before being uploaded or synchronized to the web client. Therefore, the resource type tag is named after the system name of that file system, for example, "srctype=systemname", where systemname is the system name of that file system. By updating the target resource tag and adding the new resource type tag, the image tag attributes of the target image are adjusted and updated.
[0074] In the above implementation, images from third-party websites and local files are processed in different ways and transferred to a pre-deployed file system for later uploading or synchronization. The advantage of this is that the file system can be used as an intermediate medium to manage the target images. When uploading, editing or synchronizing images on the web, the path links of the target images in the file system can be used for management and display, avoiding the problem of large images lagging in rich text editors.
[0075] In a further optional embodiment, after receiving the image number of the target image fed back by the file system in S223, the method may further include: receiving the image volume information of the target image fed back by the file system; and adding a volume tag to the image tag attribute according to the image volume information, so that the web page can calculate the total volume of the target email based on the volume tag.
[0076] The image volume information can include the image's dimensions (i.e., the number of pixels) or the image file size (i.e., the amount of storage space it occupies). Based on this image volume information, a volume tag is added to the image tag attributes. This volume tag marks the size of the target image, helping the web interface calculate the total size of the email containing the target image based on the volume tag and other email content. It's understandable that emails edited on the web interface typically need to verify their size before sending. If the size exceeds the sendable limit, an error is displayed. Therefore, adding a volume tag to the image tag attributes helps the web interface verify the email size promptly, ensuring uninterrupted sending and management, and improving email management efficiency.
[0077] In summary, as Figure 2B As shown, in a specific example, the web-based email management system frontend listens for the paste event of the rich text editor. When pasting an image into the rich text editor, the image has two possible formats: a remote image from an HTTP link or an image from the user's local folder. These two different image formats are handled differently, as described below:
[0078] If a user copies and pastes a remote image in HTTP format from a third-party website, such as "http: / / domain / image / imageid" where "domain" is the domain name of the third-party website, the frontend sends the HTTP link to the application backend, which then requests and retrieves the image via HTTP. Since each website has different access control mechanisms, there are two possible scenarios.
[0079] Some websites have strict user permission checks for static files such as images. When the application backend requests an image via an HTTP link, if it finds that the third-party website has strict user permission checks for image files and therefore cannot retrieve the image, it returns the corresponding error message to the frontend, which then promptly displays a user-friendly error message.
[0080] For images that can be obtained directly via an HTTP link, the backend saves the image to a distributed file system and then returns the corresponding file ID (fileid) and file size (filesize) to the frontend.
[0081] On the other hand, when a user copies and pastes an image from the client's local file system, the front end sends the image's binary content to the back end, the back end saves the image to the server's file system, and after successful saving, returns the corresponding file ID in the file system to the front end.
[0082] After the front-end obtains the fileid corresponding to the image, it sets and modifies the src attribute (equivalent to the resource tag mentioned in this application) of the img tag attribute (equivalent to the image tag attribute mentioned in this application) to http: / / domain / file / download?fileId=fileid, where domain is the domain name of this system, that is, accessing the image of this site through an HTTP link. In addition, a custom attribute srctype=systemname (equivalent to the resource type tag mentioned in this application) is added to the img tag to indicate that the img tag has been transformed, where systemname is the name of this system. Such img image tags will not cause lag when edited in a rich text box.
[0083] Emails typically have size limitations, such as a total size not exceeding 30MB. To facilitate front-end calculation of the total email size, a custom attribute `size=filesize` (equivalent to the volume tag mentioned in this application) needs to be added to the `img` tag. When saving the email content, the email content size needs to be added to three-quarters of the `size` value of all `img` tags with the `srctype=systemname` attribute, because the total size increases by one-third after converting binary images to base64.
[0084] After the above processing, all images in email content saved in the application are HTTP links to this application. Since emails may be sent to inboxes across isolated networks, these isolated networks cannot access the application's HTTP links. Therefore, when sending emails, the image files from the application's HTTP links need to be converted to base64 content. Specifically, a Java backend code library for parsing HTML is used to find all `img` tags in the email content with the attribute `srctype="systemname"`. The content after `fileid="` in the `src` attribute is extracted, which corresponds to the fileid in the file system. The image's content in the file system is then retrieved, converted to base64, and then overwritten into the `src` attribute of the `img` tag. For example, `src="data:image / png;base64,base64 content"`. Furthermore, the attribute `srcfileid="fileid"` is added to the `img` tag so that it is converted again to the application's HTTP format address upon receipt.
[0085] In one optional implementation, determining the synchronization strategy based on the image tag attribute of the target image in S240 may include: if a resource type tag exists in the image tag attribute, and the resource type tag is the system name of the file system, then generate a path link of the target image in the file system based on the image number; replace the resource tag of the target image with the path link, and synchronously save the target email corresponding to the target image on the web page.
[0086] When synchronizing the target email containing the target image from other email management systems to the web client, the image tag attribute of the target image is first verified. This involves checking if a resource type tag exists in the image tag attribute, i.e., whether it can be determined whether the target image was retrieved from a pre-deployed file system. If a resource type tag exists in the image tag attribute, and the resource type tag is the system name of the file system, it means that the target image was indeed retrieved from the file system. Then, based on the image number of the target image in the file system, a corresponding path link stored in the file system is generated, and the resource tag of the target image is replaced with the path link. At this point, the target email corresponding to the target image can be synchronized from other email management systems to the web client's email management system.
[0087] The above implementation method checks the image tag attributes in the target image to verify whether a resource type tag exists and whether the resource type tag is the system name of the file system. This determines whether the target image is already in the file system library, so that the path link can be directly used as the resource tag for image and email synchronization, which helps to improve the efficiency of web-based email management.
[0088] In another optional implementation, the step of determining the synchronization strategy based on the image tag attribute of the target image in S240 may further include: if there is no resource type tag in the image tag attribute, or if the resource type tag is not the system name of the file system, then the synchronization strategy is determined based on the resource tag content of the resource tag.
[0089] In conjunction with the aforementioned implementation methods, in another scenario, if the image tag attribute does not contain a resource type tag, or if the resource type tag exists but is not the system name of the file system (i.e., the target image does not exist in the file system), it is necessary to further determine the content of the resource tag before determining the synchronization method. The resource tag content is essentially what is recorded in the resource tag. The resource tag content determines how to handle the synchronization of the target image. The resource tag content marks the source of the target image or its data format, etc. Target images from different sources or with different data formats can be synchronized using different methods.
[0090] It is understandable that if the resource tag content records the encoding or format of the target image, different methods can be used to synchronize the image to the web when faced with image files of different encodings or formats. This can ensure the stable display of the image, reduce the probability of errors in the display of different images due to a single processing method, and help improve the efficiency of image synchronization to the web.
[0091] In a further optional implementation, determining the synchronization strategy based on the resource tag content of the resource tag may include:
[0092] A1. If the resource tag content is in a preset encoding format, the target image corresponding to the resource tag content will be saved in the file system.
[0093] The preset encoding format can be a commonly used image encoding on the web, such as base64 encoding. Since base64 can solve the problem of email interaction between internal and external networks (images in emails sent from internal and external networks can be directly viewed on the external network), images on the web are often uploaded or synchronized using this encoding format.
[0094] Therefore, if the target image does not exist in the file system, and the resource tag content displays the target image as base64 encoded, the target image can be directly transferred to the file system first, and then synchronized on the web later.
[0095] A2. If the resource tag content is in webpage link format, then according to the webpage link format, retrieve the target image from the webpage and save it to the file system.
[0096] Similarly, if the target image does not exist in the file system, and the resource tag content displays an icon image in the format of a webpage link, the target image is first retrieved from that webpage and transferred to the file system, and then synchronized with the web client later.
[0097] A3. Based on the target image's number in the file system, generate the updated target resource tag corresponding to the target image.
[0098] After the target image is transferred to the file system, similar to the aforementioned implementation methods, the resource tag of the target image is updated according to its number in the file system to obtain a new target resource tag. That is, regardless of where the resource tag of the target image previously indicated the source of the image, it is modified to a resource tag related to the file system after being transferred to the file system.
[0099] A4. Based on the target resource tags, synchronize the target email corresponding to the target image to the web page.
[0100] The target images are managed using the new target resource tags determined by the aforementioned steps. During the synchronization of target emails to the web, the target images are all displayed directly in the email as plugins or attachments of the target resource tags, ensuring fast display and preventing lag or display failure due to excessively large images or corrupted encoding formats.
[0101] In the above embodiments, the target images are processed according to their encoding or format as recorded in the resource tag content, and then transferred to the file system for management through the resource tag links of the file system. This can improve the efficiency of image synchronization while ensuring that the images can be displayed on the web.
[0102] In summary, as Figure 2C As shown, in another specific example, when synchronizing emails from a mail server to a web-based email management system, the system retrieves all `img` tags in the email content that have the attribute `srctype` and `srctype=systemname`. Based on the `srcfileid` attribute of that `img` tag, which is the image's identifier in the file system, the system sets the `src` attribute, for example, to `src=http: / / domain / file / download?fileId=srcfileid`.
[0103] If the img tag does not have a srctype attribute or the srctype attribute is not systemname, the following two cases will be handled:
[0104] If the src content of the img tag is in base64 format, save the base64 content of the img tag to the file system to obtain the corresponding number of the image in the file system, i.e., fileid, and set the src attribute to http: / / domain / file / download?fileId=fileid.
[0105] If the src content of the img tag is in HTTP link format, try to retrieve the image content via HTTP. If successful, save it to the file system, obtain the corresponding file ID (fileid), and set the src attribute to http: / / domain / file / download?fileId=fileid.
[0106] In other words, regardless of the image's encoding or format, the path link in the file system can ultimately be used to manage the synchronization of images to the web.
[0107] Example 3
[0108] Figure 3 This is a schematic diagram of the structure of an email image management device provided in Embodiment 3 of this application.
[0109] like Figure 3 As shown, the device 300 includes:
[0110] The management type acquisition module 310 is used to acquire the target image and the management type of the target image;
[0111] The first strategy determination module 320 is used to determine the upload strategy based on the image source of the target image in response to web-based uploads.
[0112] The second strategy determination module 330 is used to determine the synchronization strategy based on the image tag attributes of the target image in response to the management type of web-based synchronization.
[0113] The target image management module 340 is used to manage target images according to the upload strategy or synchronization strategy.
[0114] In the technical solution of this application embodiment, different management types of target images are processed separately, which can differentiate processing for different management purposes and improve the adaptability of image management. When the management type is web-based upload, the upload strategy is determined based on the image source of the target image, which can adopt different upload strategies for different image sources and flexibly manage the upload of images to the web. When the management type is web-based synchronization, the synchronization strategy is determined based on the image tag attributes of the target image, which can adopt different synchronization strategies for different information recorded in the image tag attributes and flexibly manage the synchronization of images to the web. In this way, image management on the web can manage different strategies for different situations of the image itself, which can effectively ensure that the image is successfully uploaded and synchronized on the web, reduce the probability of upload or synchronization failure, and improve the efficiency of image management in the web-based email management system.
[0115] In one alternative implementation, the first strategy determination module 320 may include:
[0116] The first file saving unit is used to save the target image to a preset file system according to the image source, and update the image tag attribute of the target image;
[0117] The image upload unit is used to upload the target image, after updating the image tag attributes, to the rich text editor on the web page.
[0118] In one optional embodiment, the first file saving unit may include:
[0119] The image link transfer sub-unit is used to save the target image to a preset file system based on the image link of the target image if the image source is any third-party website.
[0120] The local image transfer subunit is used to directly save the target image to the file system if the image source is a local file;
[0121] The image number receiving subunit is used to receive the image number of the target image returned by the file system;
[0122] The path link generation subunit is used to generate the path link of the target image in the file system based on the image number;
[0123] The resource tag replacement subunit is used to replace the resource tags of the target image with path links, generating the replaced target resource tags;
[0124] The image tag update subunit is used to generate resource type tags named after the system name of the file system, and update the image tag attributes based on the target resource tag and the resource type tag.
[0125] In one alternative embodiment, the device 300 may further include:
[0126] The volume information receiving subunit is used to receive the image volume information of the target image fed back by the file system;
[0127] The email volume calculation subunit is used to add a volume label to the image tag attribute based on the image volume information, so that the web page can calculate the total volume of the target email based on the volume label.
[0128] In another alternative implementation, the second strategy determination module 330 may include:
[0129] The first judgment unit is used to generate the path link of the target image in the file system based on the image number if the image tag attribute contains a resource type tag and the resource type tag is the system name of the file system.
[0130] The webpage synchronization unit is used to replace the resource tags of the target image with path links and synchronously save the target email corresponding to the target image on the webpage.
[0131] In one alternative implementation, the second strategy determination module 330 may further include:
[0132] The second judgment unit is used to determine the synchronization strategy based on the resource tag content if the image tag attribute does not contain a resource type tag, or if the resource type tag is not the system name of the file system.
[0133] In a further optional embodiment, the second determining unit may include:
[0134] The encoding format storage sub-unit is used to save the target image corresponding to the resource tag content in the file system if the resource tag content is in a preset encoding format.
[0135] The Webpage Link Saving Sub-unit is used to retrieve the target image from the webpage and save it to the file system if the resource tag content is in webpage link format.
[0136] The target tag determination subunit is used to generate the target resource tag corresponding to the updated target image based on the target image's number in the file system.
[0137] The target email synchronization subunit is used to synchronize the target email corresponding to the target image to the web page based on the target resource tag.
[0138] The email image management device provided in this application embodiment can execute the email image management method provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects for executing each email image management method.
[0139] Example 4
[0140] Figure 4 A schematic diagram of an electronic device 10, which can be used to implement embodiments of this application, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, 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 processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the application described and / or claimed herein.
[0141] like Figure 4As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory 12 or a random access memory 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the read-only memory 12 or loaded from storage unit 18 into the random access memory 13. The random access memory 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, read-only memory 12, and random access memory 13 are interconnected via a bus 14. An input / output interface 15 is also connected to the bus 14.
[0142] Multiple components in electronic device 10 are connected to input / output interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of monitors, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0143] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, central processing units, graphics processing units, various special-purpose artificial intelligence computing chips, various processors running machine learning model algorithms, digital signal processors, and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as email image management methods.
[0144] In some embodiments, the email image management method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via read-only memory 12 and / or communication unit 19. When the computer program is loaded into random access memory 13 and executed by processor 11, one or more steps of the email image management method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to execute the email image management method by any other suitable means (e.g., by means of firmware).
[0145] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays, application-specific integrated circuits (ASICs), application-specific standard products (ASICs), system-on-a-chip (SoCs), payload programmable logic devices (PLCs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0146] Computer programs used to implement the methods of this application may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0147] In the context of this application, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory, read-only memory, erasable programmable read-only memory, optical fibers, portable compact disk read-only memory, optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0148] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a monitor with a cathode ray tube or liquid crystal display) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0149] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0150] A computing system can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product within the cloud computing service system to address the shortcomings of traditional physical hosts and virtual private servers, such as high management difficulty and weak business scalability.
[0151] This application also discloses a computer program product, which includes a computer program that, when executed by a processor, implements the email image management method provided in any embodiment of this application. This program product shares the same inventive concept as the email image management methods disclosed in the embodiments of this application, and therefore will not be described in detail here.
[0152] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this application can be achieved, and this is not limited herein.
[0153] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for managing email images, characterized in that, include: Obtain the target image and the management type of the target image; In response to the management type being web-based upload, an upload strategy is determined based on the image source of the target image; In response to the management type being web-based synchronization, a synchronization strategy is determined based on the image tag attributes of the target image; The target image is managed according to the upload strategy or the synchronization strategy.
2. The method according to claim 1, characterized in that, The step of determining the upload strategy based on the image source of the target image includes: Based on the image source, the target image is saved to a preset file system, and the image tag attribute of the target image is updated; The target image, after updating the image tag attributes, is uploaded to a rich text editor on the web page.
3. The method according to claim 2, characterized in that, The step of saving the target image to a preset file system according to the image source and updating the image tag attributes of the target image includes: If the image source is any third-party website, the target image is saved to a preset file system according to the image link of the target image; If the image source is a local file, the target image is directly saved to the file system; Receive the image number of the target image returned by the file system; Based on the image number, generate the path link of the target image in the file system; Replace the resource tags of the target image with the path links to generate the replaced target resource tags; Generate a resource type label named after the system name of the file system, and update the image label attribute according to the target resource label and the resource type label.
4. The method according to claim 3, characterized in that, After receiving the image number of the target image returned by the file system, the method further includes: Receive the image volume information of the target image fed back by the file system; Based on the image volume information, a volume tag is added to the image tag attribute so that the web page can calculate the total volume of the target email based on the volume tag.
5. The method according to claim 3, characterized in that, The step of determining the synchronization strategy based on the image tag attributes of the target image includes: If the resource type tag exists in the image tag attribute, and the resource type tag is the system name of the file system, then a path link of the target image in the file system is generated based on the image number. Replace the resource tags of the target image with the path link, and simultaneously save the target email corresponding to the target image on the webpage.
6. The method according to claim 3, characterized in that, The step of determining the synchronization strategy based on the image tag attributes of the target image further includes: If the resource type tag is not present in the image tag attribute, or if the resource type tag is not the system name of the file system, then the synchronization strategy is determined based on the resource tag content of the resource tag.
7. The method according to claim 6, characterized in that, Determining the synchronization strategy based on the resource tag content of the resource tag includes: If the resource tag content is in a preset encoding format, then the target image corresponding to the resource tag content is saved in the file system; If the resource tag content is in webpage link format, then according to the webpage link format, the target image is obtained from the webpage and saved to the file system; Based on the target image's number in the file system, generate an updated target resource tag corresponding to the target image; Based on the target resource tag, the target email corresponding to the target image is synchronized to the web page.
8. An email image management device, characterized in that, include: The management type acquisition module is used to acquire the target image and the management type of the target image; The first strategy determination module is used to determine the upload strategy based on the image source of the target image in response to the management type being web-based upload. The second strategy determination module is used to determine the synchronization strategy based on the image tag attributes of the target image in response to the management type being web-based synchronization. The target image management module is used to manage the target images according to the upload strategy or the synchronization strategy.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the email image management method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the email image management method according to any one of claims 1-7.