Image message sending method, device, equipment and storage medium
By locally compressing and parallel uploading of image messages on the client, the problem of users waiting for too long when sending image messages is solved, and the user experience is optimized.
Patent Information
- Application Number
- CN202411959940.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-12-30
AI Technical Summary
When sending video or image messages, the user needs to jump from the message session page to the image selection page, select and send images, resulting in an increase in the time required for the backend to upload images, and the user waits for a long time on the image selection page, which affects the conversation experience.
When the user selects to send an image, the first thread is called to compress the image to be sent, and the compressed image is saved locally and added to the upload queue. The second thread performs upload processing. After the user interaction interface completes compression of all the images to be sent, the image message corresponding to the compressed image is displayed.
Through local compression and parallel upload processing, the user's waiting time on the image selection page is shortened, the user's conversation experience is optimized, and the user's feeling of lag is avoided.
Smart Images

Figure CN119383154B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, equipment and storage medium for sending an image message. Background Art
[0002] With the development of Internet technology, instant messaging (IM) has become an indispensable part of people's daily life. Through instant messaging software, users can exchange instant information in various message forms such as text, audio, video, and pictures.
[0003] When sending image messages such as videos and pictures, users usually need to jump from the message conversation page to a separate image selection page, select and send the image for the backend to upload. After obtaining the image path, the backend returns to the message conversation page to send the image message selected this time. As the image size and the number of images sent at one time increase, the time required for the backend to upload the image increases, which increases the time it takes to return to the message conversation page from the image selection page. That is, the user needs to wait for a long time on the image selection page before returning to the message conversation page, which deteriorates the user's conversation experience. Summary of the invention
[0004] In view of the above problems, the present application provides an image message sending method, apparatus, device and storage medium to shorten the waiting time of the user on the image selection page after performing an image sending operation, thereby optimizing the user's conversation experience.
[0005] The specific plan is as follows:
[0006] The first aspect of the present application provides an image message sending method, which is applied to a client and includes:
[0007] In response to a user's image sending request, switching the user interaction interface from a message conversation page to an image selection page;
[0008] In the process of displaying the image selection page on the user interaction interface, in response to the user's image selection and sending operation, determining the image to be sent, calling the first thread to compress the image to be sent, and saving the obtained compressed image locally and adding it to the upload queue; wherein the compressed image saved locally is used by the client to render and display the image message corresponding to the compressed image on the message conversation page;
[0009] Invoke a second thread to upload the compressed image in the upload queue, and in response to receiving an image path of the compressed image sent by the image server, send a message including the image path to the server;
[0010] After all the images to be sent are compressed, the user interaction interface is switched from the image selection page to the message conversation page, and the image message corresponding to the image to be sent is displayed on the message conversation page.
[0011] A second aspect of the present application provides an image message sending device, which is applied to a client, and the device includes:
[0012] A receiving module, used for receiving a user's image sending request;
[0013] A display module, configured to switch the user interaction interface from the message conversation page to the image selection page in response to a user's image sending request;
[0014] The receiving module is also used to receive the user's image selection and sending operation;
[0015] A processing module is used to determine the image to be sent in response to the user's image selection and sending operation during the process of displaying the image selection page on the user interaction interface, and call the first thread to compress the image to be sent, save the obtained compressed image locally and add it to the upload queue, wherein the compressed image saved locally is used by the client to render and display the image message corresponding to the compressed image on the message conversation page; and call the second thread to upload the compressed image in the upload queue, and send a message containing the image path to the server in response to the image path of the compressed image sent by the image server;
[0016] The display module is also used to switch the user interaction interface from the image selection page to the message conversation page after all the images to be sent are compressed, and to display the image message corresponding to the images to be sent on the message conversation page.
[0017] The third aspect of the present application provides an image message sending device, comprising at least one processor and a memory connected to the processor, wherein:
[0018] The memory is used to store computer programs;
[0019] The processor is used to execute the computer program to implement the image message sending method described in the first aspect above.
[0020] A fourth aspect of the present application provides a storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the image message sending method described in the first aspect.
[0021] With the help of the above technical scheme, the present application is applied to the client, first responding to the user's image sending request, switching the user interaction interface from the message conversation page to the image selection page, and then during the display process of the image selection page, responding to the user's image selection and sending operation, determining the image to be sent, and calling the first thread to compress the image to be sent, saving the obtained compressed image locally and adding it to the upload queue; after all the images to be sent are compressed, switching the user interaction interface back to the message conversation page, and displaying the image message corresponding to the image to be sent on the message conversation page; for the compressed image in the upload queue, calling the second thread for upload processing, and then responding to the received image path of the compressed image, sending a message containing the image path to the server.
[0022] Since the compressed images saved locally can be used by the client to render and display the corresponding image messages on the message conversation page, the client can switch the interactive interface back to the message conversation page after compressing all the images to be sent, without waiting for the image server to feedback the corresponding image path, thus shortening the user's waiting time on the image selection page and allowing the user to return to the message conversation page and view the message as soon as possible, avoiding user lag, thereby optimizing the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0024] Figure 1 A flowchart of a method for sending an image message provided by the present application;
[0025] Figure 2 An example of a message conversation page schematic diagram during the image message sending process is shown;
[0026] Figure 3 A schematic diagram of the structure of an image message sending device provided by the present application;
[0027] Figure 4 A schematic diagram of the structure of an image message sending device provided in this application. DETAILED DESCRIPTION
[0028] The embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation mode of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application. It is known to those skilled in the art that with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0029] The present application provides an image message sending method, apparatus, device and storage medium, which can be used to solve the problem of a long waiting time on an image selection page after a user chooses to send an image, so as to optimize the user's conversation experience.
[0030] The present application can be applied to a client, specifically a client with an instant messaging function, which is usually run on a client computer. Figure 1 A flowchart of a method for sending an image message provided by this application, combined with Figure 1 As shown, the method may include the following steps:
[0031] Step S101 : In response to a user's image sending request, the user interaction interface is switched from a message conversation page to an image selection page.
[0032] It should be noted that initially, the interface displays a message conversation page, i.e., a page for users to view and send conversation messages; the user's image sending request is triggered by the user's operation on the message conversation page. In a possible implementation, the image sending request can be triggered based on the user's click operation on the icon corresponding to the image sending function in the message conversation page; after receiving the image sending request, the page displayed on the interactive interface is switched to an image selection page, so that the user can view the available local images and select the image to be sent. In addition, the images described in this application can include static images, i.e., pictures, and dynamic images, such as videos.
[0033] Step S102: in the process of displaying the image selection page on the user interaction interface, in response to the user's image selection and sending operation, determining the image to be sent, calling the first thread to compress the image to be sent, saving the compressed image locally and adding it to the upload queue.
[0034] The above-mentioned image selection and sending operation may include: the operation of selecting any number of images on the image selection page and the operation of sending on the image selection page after completing the image selection, such as clicking the "Send" button. It should be noted that the image selected by the user to send, that is, the above-mentioned image to be sent, may include one or more images; when multiple images are included, the types of the multiple images may be the same or different; that is, this application does not limit the number of images and image types to be sent at a single time.
[0035] Since the images taken by current devices such as mobile phones have very high definition, the file size of local images is usually large and usually does not meet the file size limit of the upload service. In addition, users usually do not need to send images with too high definition. Based on this, in order to meet the image upload requirements and reduce the time and traffic required to send images, the local image can be compressed after determining the image to be sent and before uploading the image to reduce the size of the image file.
[0036] In a possible implementation, after determining the image to be sent, the first thread can be started to compress the image to be sent. In a possible implementation, the above processing can be performed on the image to be sent in sequence to speed up the image upload process. Specifically, the compression processing process may include the following steps AC:
[0037] Step A: determining the image to be compressed this time from the uncompressed images to be sent according to a preset order.
[0038] The preset order may be the order in which the user selects the images, or any other order, which is not limited in this application.
[0039] Step B: compress the image to be compressed to obtain a corresponding compressed image.
[0040] Step C: Save the compressed image locally and add it to the upload queue, and then return to step A until all the images to be sent are compressed.
[0041] Step S103: calling the second thread to upload the compressed image in the upload queue, and in response to receiving the image path of the compressed image sent by the image server, sending a message including the image path to the server.
[0042] The second thread is another thread different from the first thread, and the two threads can work in parallel. In a possible implementation, after the compressed image corresponding to the first image in the images to be sent is added to the upload queue, the second thread can be enabled and the second thread can be called to perform the upload process.
[0043] Exemplarily, the upload process may include: determining the compressed image with the earliest writing time in the upload queue as the target image, sending the target image to the image server to obtain the image path, waiting for the image server to respond, and if the image path of the target image sent by the image server is received within a preset time, then determining that the target image is successfully uploaded, otherwise determining that the target image is not successfully uploaded. Then, after receiving the image path and determining that the image is successfully uploaded, sending a message containing the image path to the server to implement the image message sending task. In the process of calling the second thread to perform the upload process, the page displayed on the user interaction exchange interface of the client is related to the compression progress of the first thread, which may be an image selection page or a message conversation page.
[0044] It should be noted that the image server is used to process and store image files, and provide services such as image reception, temporary storage, routing, and retrieval. After receiving the image file, the image server saves the received image file, generates the corresponding image path, and feeds it back to the client that uploaded the image, so that the client, as the image message receiver, can obtain the image and display the image message based on the image path. The image path can also be called the image URL (Uniform Resource Locator, URL), which is used to represent the image. Unlike the image server, the server cooperates with the client in the instant messaging system to establish and maintain the communication connection between users and process user message requests.
[0045] Step S104: after all the images to be sent are compressed, the user interaction interface is switched from the image selection page to the message conversation page, and the image message corresponding to the image to be sent is displayed on the message conversation page.
[0046] It should be noted that the compressed image stored locally is used by the client to render and display the image message corresponding to the compressed image on the message conversation page. Based on this, after all the images to be sent are compressed, the client obtains the basis for rendering and displaying all the image messages on the message conversation page, and can jump back to the message conversation page for rendering and display. Compared with the solution of returning to the message conversation page to use the image URL to display the image and send the image message after obtaining the image URL, the present application can display the corresponding image message by means of the compressed image stored locally, so there is no need to wait for the client to upload the image and the image server to respond, that is, when returning to display the message conversation page, you do not need to care about the image upload status, thereby shortening the time required for the user to return to the message conversation page after choosing to send the image, and realizing the rapid display of the image message.
[0047] By means of the above scheme, the image message sending process in the instant messaging system is optimized as a whole. Specifically, the client first responds to the user's image sending request and switches the user interaction interface from the message conversation page to the image selection page. Then, during the display process of the image selection page, in response to the user's image selection and sending operation, the image to be sent is determined, and the first thread is called to compress the image to be sent. The compressed image is saved locally and added to the upload queue, which compresses the size of the image file to be transmitted, providing a basis for improving the transmission speed of the image message. After all the images to be sent are compressed, the user interaction interface is switched back to the message conversation page, and the image message corresponding to the image to be sent is displayed on the message conversation page. For the compressed image in the upload queue, the second thread is called to perform upload processing, and then in response to the received image path of the compressed image, a message containing the image path is sent to the server.
[0048] Since the first thread and the second thread can work in parallel, that is, while the first thread is compressing the image, the second thread can upload the compressed image, thereby improving the efficiency of sending image messages; on this basis, the compressed image saved locally can be used for the client to render and display the corresponding image message on the message conversation page, so that the client can switch the interactive interface back to the message conversation page after compressing all the pictures to be sent, and display the corresponding image message without waiting for the image server to feedback the corresponding image path, thereby shortening the user's waiting time on the image selection page, allowing the user to return to the message conversation page and view the message as soon as possible, thereby avoiding the user from feeling stuck, thereby optimizing the user experience.
[0049] In one or more embodiments provided in the present application, the above-mentioned displaying the image message corresponding to the image to be sent on the message conversation page may include the following steps DF:
[0050] Step D: Determine the initial state of the image to be sent.
[0051] Among them, the initial state is the upload state when the user interaction interface switches to the message conversation page. Specifically, the upload state described in the present application may include: uploading state, upload success state and upload failure state. Among them, the upload success state refers to the state in which the image path fed back by the image server is received within a preset time length; the upload failure state refers to the state in which the image path fed back by the image server is not received within a preset time length. In addition, the upload state described in the present application can represent the sending state of the corresponding image message.
[0052] Step E: using an object corresponding to the initial state of the image to be sent, rendering and displaying an image message corresponding to the image to be sent on the message conversation page.
[0053] Specifically, the above step E may include: for any image among the images to be sent, performing the following steps:
[0054] Step E1, determining the initial state of the image, if the initial state of the image indicates that the image has been uploaded successfully, executing step E2, otherwise executing step E3;
[0055] Step E2: using the image path corresponding to the image, rendering and displaying the image message corresponding to the image on the message conversation page;
[0056] Step E3: Using the compressed image corresponding to the image stored locally, rendering and displaying the image message corresponding to the image on the message conversation page and displaying the upload status mark of the image.
[0057] The upload status identifier includes an identifier indicating that the upload is in progress or that the upload has failed.
[0058] For example, Figure 2 The following figure shows the interface diagram when the message conversation page is just switched back. Figure 2 As shown, the initial upload status of the image corresponding to the first image message is the upload success status, and the message is rendered using the image path; the initial upload status of the image corresponding to the second image message is the upload failure status, and the corresponding upload status identifier is an exclamation mark representing the upload failure; the initial upload status of the image corresponding to the third image message is the uploading status, and the message is rendered using the compressed image saved locally, and the corresponding upload status identifier is a loading identifier representing the uploading.
[0059] Step F: after the upload status of any image among the images to be sent changes, update the upload status indicator of the image displayed in the message conversation page.
[0060] The above scheme uses the object corresponding to the initial state of the image when rendering and displaying the image message. Specifically, for the image that has not been successfully uploaded when switching back to the message conversation page, the local compressed image is used to render and display the image message. For the image that has been successfully uploaded when switching back to the message conversation page, the image path is used to render and display the image message. Compared with the scheme of using all local compressed images to render and display image messages, the above scheme can avoid repeated rendering of image messages corresponding to images that have been successfully uploaded when switching back to the message conversation page, saving computing power.
[0061] In one or more embodiments provided in the present application, the change in the upload status of any one of the images to be sent may include: receiving an image path corresponding to any one of the images to be sent, so that the upload status of the image changes to a successful upload status; or, not receiving the image path corresponding to the image within a preset time after uploading any one of the images to be sent, so that the upload status of the image changes to a failed upload status.
[0062] Based on the above content, in a possible implementation, updating the upload status indicator of the image displayed in the message conversation page may include: after the upload status of the image changes to a successful upload status, removing the upload status indicator of the image.
[0063] Similarly, updating the upload status indicator of the image displayed in the message conversation page may include: after the upload status of the image changes to an upload failure status, updating the displayed upload status indicator of the image to an indicator indicating upload failure.
[0064] This embodiment reflects the sending status of the image message by updating the displayed upload status mark. Specifically, if the upload fails, it means that the corresponding image path has not been obtained, and the corresponding message has not been sent to the server, that is, the image message sending fails. In other words, no matter whether the image sent by the user is finally uploaded successfully or failed, the image message displayed on the message conversation page is refreshed, and the corresponding picture UI (User Interface, UI) provides the user with the correct message sending status, which helps the user to know the message sending status in time.
[0065] In one or more embodiments provided in the present application, after the upload status of the image changes to the upload success status, the method may further include:
[0066] The image path corresponding to the image is adopted to update the image message corresponding to the image rendered and displayed in the message conversation page.
[0067] In one or more embodiments provided in the present application, after rendering and displaying the image message corresponding to the image, the method further includes:
[0068] The compressed image corresponding to the image whose upload status is successfully uploaded is deleted from the local computer.
[0069] That is, after using the image path corresponding to the image to render and display the image message corresponding to the image on the message conversation page, or using the image path corresponding to the image to update the image message corresponding to the image rendered and displayed in the message conversation page, the compressed image corresponding to the image is deleted.
[0070] The above solution clears the locally saved compressed images in a timely manner, implements GC (garbage collection) logic, and reduces client pressure.
[0071] The image message sending device provided in an embodiment of the present application is described below. The image message sending device described below and the image message sending method described above can be referred to each other.
[0072] Figure 3 This is a schematic diagram of the structure of an image message sending device provided by the present application, which can be applied to a client. Figure 3 As shown, the device may include:
[0073] A receiving module 11 is used to receive a user's image sending request;
[0074] The display module 12 is used to switch the user interaction interface from the message conversation page to the image selection page in response to the user's image sending request;
[0075] The receiving module 11 is also used to receive the user's image selection and sending operation;
[0076] The processing module 13 is used to determine the image to be sent in response to the user's image selection and sending operation during the process of displaying the image selection page on the user interaction interface, and call the first thread to compress the image to be sent, save the obtained compressed image locally and add it to the upload queue, wherein the compressed image saved locally is used by the client to render and display the image message corresponding to the compressed image on the message conversation page; and call the second thread to upload the compressed image in the upload queue, and send a message containing the image path to the server in response to the image path of the compressed image sent by the image server;
[0077] The display module 12 is further configured to switch the user interaction interface from the image selection page to the message conversation page after all the images to be sent have been compressed, and to display the image message corresponding to the images to be sent on the message conversation page.
[0078] In one or more embodiments provided in the present application, the process of the display module 12 displaying the image message corresponding to the image to be sent on the message conversation page may include:
[0079] Determine the initial state of the image to be sent; the initial state is the upload state when the user interaction interface switches to the message conversation page;
[0080] For any image among the images to be sent, if the initial state of the image indicates that the image has been successfully uploaded, the image path corresponding to the image is used to render and display the image message corresponding to the image on the message conversation page; otherwise, the compressed image corresponding to the image stored locally is used to render and display the image message corresponding to the image on the message conversation page and display the upload state mark of the image; the upload state mark includes a mark indicating that uploading is in progress or uploading has failed;
[0081] After the upload status of any one of the images to be sent is changed, the upload status indicator of the image displayed in the message conversation page is updated.
[0082] In one or more embodiments provided in the present application, the change in the upload status of any one of the images to be sent includes: receiving an image path corresponding to any one of the images to be sent, so that the upload status of the image changes to a successful upload status; or, not receiving the image path corresponding to the image within a preset time after uploading any one of the images to be sent, so that the upload status of the image changes to a failed upload status.
[0083] In one or more embodiments provided in the present application, the process in which the display module 12 displays the image message corresponding to the image to be sent on the message conversation page may further include:
[0084] After the upload status of the image changes to a successful upload status, the image path corresponding to the image is used to update the image message corresponding to the image rendered and displayed in the message conversation page.
[0085] In one or more embodiments provided in the present application, the processing module 13 may also be configured to locally delete the compressed image corresponding to the image whose upload status is a successful upload status after rendering and displaying the image message corresponding to the image.
[0086] The image message sending device provided in the embodiment of the present application can be applied to an image message sending device, such as a terminal with data processing capability: a mobile phone, a computer, etc., on which a client runs. Optionally, Figure 4 The hardware structure diagram of the image message sending device is shown in FIG. Figure 4 , the hardware structure of the image message sending device may include: at least one processor 1, at least one communication interface 2, at least one memory 3 and at least one communication bus 4;
[0087] In the embodiment of the present application, the number of the processor 1, the communication interface 2, the memory 3, and the communication bus 4 is at least one, and the processor 1, the communication interface 2, and the memory 3 communicate with each other through the communication bus 4;
[0088] The processor 1 may be a central processing unit CPU, or an application-specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention, etc.;
[0089] The memory 3 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory;
[0090] The memory is used to store a computer program, and the processor is used to execute the computer program, so that the image message sending device can implement any of the above-mentioned image message sending methods.
[0091] A storage medium is also provided in an embodiment of the present application. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any image message sending method provided in the embodiment of the present application.
[0092] An embodiment of the present application also provides a computer program product including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any one of the image message sending methods provided in the embodiments of the present application.
[0093] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0094] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can refer to each other.
[0095] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for sending an image message, characterized in that: Applied to the client, including: In response to a user's image sending request, switching a user interaction interface from a message conversation page to an image selection page; In the process of displaying the image selection page on the user interaction interface, in response to the user's image selection and sending operation, determining the image to be sent, calling the first thread to compress the image to be sent, and saving the obtained compressed image locally and adding it to the upload queue; wherein the compressed image saved locally is used by the client to render and display the image message corresponding to the compressed image on the message conversation page; Invoke a second thread to upload the compressed image in the upload queue, and in response to receiving an image path of the compressed image sent by the image server, send a message including the image path to the server; After all the images to be sent are compressed, the user interaction interface is switched from the image selection page to the message conversation page, and an image message corresponding to the image to be sent is displayed on the message conversation page; Wherein, displaying the image message corresponding to the image to be sent on the message conversation page includes: Determine the initial state of the image to be sent; the initial state is the upload state when the user interaction interface switches to the message conversation page; For any image among the images to be sent, if the initial state of the image indicates that the image has been successfully uploaded, the image path corresponding to the image is used to render and display the image message corresponding to the image on the message conversation page; otherwise, the compressed image corresponding to the image stored locally is used to render and display the image message corresponding to the image on the message conversation page and display the upload state mark of the image; the upload state mark includes a mark indicating that uploading is in progress or uploading has failed; After the upload status of any one of the images to be sent is changed, the upload status indicator of the image displayed in the message conversation page is updated.
2. The image message sending method according to claim 1, characterized in that: The change of the upload status of any one of the images to be sent includes: receiving the image path corresponding to any one of the images to be sent, so that the upload status of the image changes to the upload success status; or, not receiving the image path corresponding to the image within a preset time after uploading any one of the images to be sent, so that the upload status of the image changes to the upload failure status.
3. The image message sending method according to claim 2, characterized in that: After the upload status of the image changes to the upload success status, the method further includes: The image path corresponding to the image is adopted to update the image message corresponding to the image rendered and displayed in the message conversation page.
4. The image message sending method according to any one of claims 1 to 3, characterized in that: After rendering and displaying the image message corresponding to the image, the method further includes: The compressed image corresponding to the image whose upload status is successfully uploaded is deleted from the local computer.
5. An image message sending device, characterized in that: Applied to the client, the device includes: A receiving module, used for receiving a user's image sending request; A display module, configured to switch the user interaction interface from the message conversation page to the image selection page in response to a user's image sending request; The receiving module is also used to receive the user's image selection and sending operation; A processing module is used to determine the image to be sent in response to the user's image selection and sending operation during the process of displaying the image selection page on the user interaction interface, and call the first thread to compress the image to be sent, save the obtained compressed image locally and add it to the upload queue, wherein the compressed image saved locally is used by the client to render and display the image message corresponding to the compressed image on the message conversation page; and call the second thread to upload the compressed image in the upload queue, and send a message containing the image path to the server in response to the image path of the compressed image sent by the image server; The display module is also used to switch the user interaction interface from the image selection page to the message conversation page after all the images to be sent are compressed, and display the image message corresponding to the images to be sent on the message conversation page; The process of the display module displaying the image message corresponding to the image to be sent on the message conversation page includes: Determine the initial state of the image to be sent; the initial state is the upload state when the user interaction interface switches to the message conversation page; For any image among the images to be sent, if the initial state of the image indicates that the image has been successfully uploaded, the image path corresponding to the image is used to render and display the image message corresponding to the image on the message conversation page; otherwise, the compressed image corresponding to the image stored locally is used to render and display the image message corresponding to the image on the message conversation page and display the upload state mark of the image; the upload state mark includes a mark indicating that uploading is in progress or uploading has failed; After the upload status of any one of the images to be sent is changed, the upload status indicator of the image displayed in the message conversation page is updated.
6. The image message sending device according to claim 5, characterized in that: The processing module is further used for: after rendering and displaying the image message corresponding to the image, deleting the compressed image corresponding to the image with the upload status of successful upload from the local computer.
7. An image message sending device, characterized in that: The method comprises at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is configured to execute the computer program so as to enable the image message sending device to implement the image message sending method according to any one of claims 1 to 4.
8. A storage medium, characterized in that: The storage medium carries one or more computer programs, and when the one or more computer programs are executed by an electronic device, the electronic device can implement the image message sending method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Method for rapidly sending pictures and mobile terminal thereof
CN103327182A
Picture uploading method, device, application interactive platform, terminal and system
CN104281590A
Fixed picture storage method, fixed picture calling method and storage medium
CN118449943A