End-cloud collaboration based image processing method and related apparatus

By uploading differential images from terminal devices to the cloud for image retouching, the problem of limited computing power on terminal devices is solved, achieving efficient image processing with low data traffic and low latency, thus improving the user experience.

WO2024193523A1PCT designated stage expired Publication Date: 2024-09-26HUAWEI TECH CO LTD

Patent Information

Application Number
PCT/CN2024/082306
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-06-30
Filing Date
2024-03-18
Publication Date
2024-09-26

AI Technical Summary

Technical Problem

In existing technologies, the computing power of mobile phones and other terminal devices is limited in image processing, resulting in high image transmission data traffic and prolonged processing time. Users cannot view the refined images in the cloud in a timely manner, and the problem is more serious in continuous shooting scenarios.

Method used

Through edge-cloud collaborative image processing, the terminal device uploads a differential image to the cloud for fine retouching. The cloud then restores and processes the image based on the differential image, reducing the computing power requirements and load on the terminal device, and lowering image transmission data traffic and processing latency.

Benefits of technology

It effectively reduces data traffic and processing latency in image transmission, allowing users to view the refined images in the cloud in a timely manner, thus improving the user experience, especially significantly improving image processing efficiency in continuous shooting scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024082306_26092024_PF_FP
    Figure CN2024082306_26092024_PF_FP
Patent Text Reader

Abstract

The present application provides an end-cloud collaboration based image processing method and a related apparatus. The method comprises: an electronic device obtains a first image to be processed; the electronic device sends a first region image of the first image to a server by means of a first request message; the electronic device obtains a second image to be processed; the electronic device sends a first differential image to the server by means of a second request message, wherein the first differential image is a differential image between a second region image and the first region image; the server restores the second region image according to the first differential image and the first region image; the server performs image processing on the second region image to obtain a refined image of the second region image; the server sends a second response message to the electronic device, wherein the second response message is used for indicating the refined image of the second region image; the electronic device determines a refined image of the second image on the basis of the refined image of the second region image. In this way, data traffic for image transmission can be effectively reduced, a processing delay can be reduced, and high-efficiency image processing can be achieved in cooperation with the cloud.
Need to check novelty before this filing date? Find Prior Art

Description

End-cloud collaborative image processing method and related device

[0001] This application claims priority to the Chinese patent application with application number 202310354227.5 filed with the State Intellectual Property Office of China on March 21, 2023, and priority to the Chinese patent application with invention name “A cloud camera processing method, electronic device, server and system”. This application claims priority to the Chinese patent application with application number 202310809249.6 filed with the State Intellectual Property Office of China on June 30, 2023, and priority to the Chinese patent application with invention name “End-cloud collaborative image processing method and related device”, all contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of electronic technology, and in particular to an end-cloud collaborative image processing method and related devices. Background Art

[0003] As users' demand for photography increases, the image processing capabilities of the central processing units (CPUs) in mobile phones and other devices are increasingly demanding. However, due to hardware limitations, the performance improvements of the CPUs in mobile phones and other devices are limited.

[0004] With the development of cloud computing, shifting computing power from devices to the cloud has become a key trend in technological evolution. However, for scenarios involving the fine-tuning of multiple images, how to achieve efficient image processing in collaboration with the cloud while ensuring low data traffic and processing latency remains a research topic.

[0005] Summary of the Invention

[0006] The embodiment of the present application provides an end-cloud collaborative image processing method, which can effectively reduce the data traffic of image transmission and reduce processing delay, and collaborate with the cloud to achieve high-efficiency image processing, so that users can view the cloud-refined images in a timely manner on the end side, effectively improving the user experience.

[0007] In a first aspect, an embodiment of the present application provides a cloud camera processing method, the system including an electronic device and a server, the method including: the electronic device obtains a first image to be processed; the electronic device sends a first area map of the first image to the server through a first request message; the first area map includes images within a part or all area of ​​the first image; the electronic device obtains a second image to be processed, and the second area map includes images within a part or all area of ​​the second image; the electronic device sends a first differential image to the server through a second request message, the first differential image being a differential image between the second area map of the second image and the first area map of the first image; the server restores the second area map based on the first differential image and the first area map; the server performs image processing on the second area map to obtain a refined image of the second area map; the server sends a second response message to the electronic device, the second response message being used to indicate the refined image of the second area map; the electronic device determines the refined image of the second image based on the refined image of the second area map.

[0008] In implementing the embodiment of the present application, for the second image to be processed, the terminal side can upload the image and the differential image of the first image, where the first image has been uploaded to the cloud before the second image or uploaded to the cloud at the same time as the second image; the cloud (i.e., the server) restores the second image based on the differential image and refines the second image. By collaborating with the cloud to refine the second image, the computing power requirements and load on the terminal side can be reduced; compared to uploading the second image, uploading the differential image can reduce the amount of image data transmitted between the terminal side and the cloud, thereby effectively reducing the data traffic of the image transmission and reducing the processing delay, and collaborating with the cloud to achieve efficient image processing, so that users can view the cloud-refined images in a timely manner on the terminal side, effectively improving the user experience.

[0009] In one implementation, the second response message includes a second differential image, which is a differential image between a refined image of the second region image and the second region image; the method further includes: the electronic device restores the refined image of the second region image based on the second differential image and the second region image. In implementing the embodiment of the present application, the cloud sends the differential image of the second region image before and after refinement to the end side, and the end side can restore the refined image of the second region image based on the differential image. Compared with directly sending the refined image of the second region image, sending the differential image can reduce the amount of data transmitted between the end side and the cloud side, thereby effectively reducing the data traffic of the image transmission and reducing the processing delay, so that the user can view the cloud-refined image in a timely manner on the end side.

[0010] In one implementation, the method further includes: the server performs image processing on the first area image to obtain a refined image of the first area image; the server sends a first response message to the electronic device, the first response message is used to indicate the refined image of the first area image; the electronic device determines the refined image of the first image based on the refined image of the first area image. In implementing the embodiment of the present application, the cloud sends the differential image of the first area image before and after the refinement to the end side, and the end side can restore the refined image of the first area image based on the differential image. Compared with directly sending the refined image of the first area image, sending the differential image can reduce the amount of data transmitted between the end side and the cloud side, thereby effectively reducing the data traffic of the image transmission and reducing the processing delay, so that the user can view the cloud-refined image in time on the end side.

[0011] In one implementation, the electronic device is provided with a continuous shooting function, and the first image and the second image are two images taken in one continuous shooting function; the method further includes: the electronic device detects a first input operation to start the continuous shooting function; the above-mentioned electronic device obtains the first image to be processed, and the electronic device obtains the second image to be processed, including: in response to the first input operation, the electronic device obtains the first image and the second image of the continuous shooting; the first image is the first image of the continuous shooting, and the second image is the non-first image of the continuous shooting. In implementing the embodiment of the present application, the similarity of images continuously shot by the continuous shooting function is generally high; in the scenario where the continuous shooting function is used to shoot images, the terminal side can upload the first image of the continuous shooting to the cloud; for the non-first image of the continuous shooting, such as the second image, the terminal side can upload the differential image of the image and the first image to the cloud. Compared with directly uploading the second image, uploading the differential image can effectively reduce the data traffic of the image transmission and reduce the processing delay.

[0012] In one implementation, the electronic device acquires a first image to be processed, including: in response to a detected first shooting instruction, the camera of the electronic device captures the first image; the electronic device acquires a second image to be processed, including: in response to a detected second shooting instruction, the camera of the electronic device captures the second image; the shooting time interval between the second image and the first image is less than a time threshold, and / or the similarity between the second image and the first image is greater than a similarity threshold. In implementing an embodiment of the present application, in a scenario where a single image is captured multiple times in succession, when the shooting time interval between the captured second image and the first image is less than a time threshold, and / or the similarity with the first image is greater than a similarity threshold, the terminal side can upload a differential image of the image and the first image to the cloud. Compared with directly uploading the second image, uploading the differential image can effectively reduce the data traffic of image transmission and reduce processing delay.

[0013] In one implementation, the method further includes: the electronic device obtains a third image to be processed; the electronic device sends a third differential image to the server through a third request message, the third differential image being a differential image between a third region map of the third image and a first region map of the first image; the third region map includes images within part or all of the region of the third image; the server restores the third region map based on the third differential image and the first region map; the server performs image processing on the third region map to obtain a refined image of the third region map; the server sends a third response message to the electronic device, the third response message being used to indicate the refined image of the third region map; the electronic device determines the refined image of the third image based on the refined image of the third region map. In implementing the embodiment of the present application, the reference image (i.e., the first image) used for differential processing of the third image is an image that has been uploaded to the cloud as a non-differential image. In implementing the embodiment of the present application, after uploading the first image to the cloud, for other images to be processed, the end side uploads to the cloud a differential image of the image to be processed and the first image. Exemplarily, in a scene shot using a continuous shooting function, for non-first images of the continuous shooting, the end side uploads to the cloud a differential image of the image and the first image of the continuous shooting.

[0014] In one implementation, the method further includes: the electronic device obtains a third image to be processed; the electronic device sends a third differential image to the server through a third request message, the third differential image being a differential image between a third region map of the third image and a second region map of the second image; the third region map includes images within part or all of the region of the third image; the server restores the third region map based on the third differential image and the second region map; the server performs image processing on the third region map to obtain a refined image of the third region map; the server sends a third response message to the electronic device, the third response message being used to indicate the refined image of the third region map; the electronic device determines the refined image of the third image based on the refined image of the third region map. In implementing the embodiment of the present application, the reference image (i.e., the second image) used for differential processing of the third image is an image whose corresponding differential image has been uploaded to the cloud. In implementing the embodiment of the present application, for the third image to be processed, the end side uploads to the cloud a differential image of the third image and the previous image to be processed of the third image. Exemplarily, in a scene shot using the continuous shooting function, for non-first images of the continuous shooting, the end side uploads to the cloud a differential image of the image and the previous image of the continuous shooting.

[0015] In one implementation, for the third image to be processed, the terminal side may upload to the cloud a differential image between the third image and any image that has been uploaded to the cloud.

[0016] In one implementation, the electronic device sends a first differential image to the server via a second request message, including: when the data size of the first differential image is less than the data size of the second region map, the electronic device sends the first differential image and the image identifier of the first region map to the server via the first request message; when the data size of the second differential image is less than the data size of the refined image of the second region map, the second response message includes the second differential image and the image identifier of the second region map, and the second differential image is a differential image between the refined image of the second region map and the second region map; when the data size of the second differential image is less than the data size of the refined image of the second region map, the second response message includes the refined image of the second region map. In implementing this embodiment of the present application, after the end-side / cloud-end performs differential processing on a specific image, if the data size of the differential image corresponding to the specific image is smaller than that of the specific image, the differential image is sent; otherwise, the specific image is directly sent. In this way, the amount of image data transmitted between the end-side and the cloud-end can be kept as small as possible, thereby effectively reducing the data traffic of image transmission and lowering processing delay.

[0017] In one implementation, when the image refinement mode is the full-image refinement mode, the regional map of the image includes the image content in the entire area of ​​the image; when the second image refinement mode is the full-image refinement mode, the second image and the second regional map are the same, and the refined map of the second regional map is the refined map of the second image. In implementing the embodiment of the present application, the refinement mode of the image to be processed is identified, and for the image to be processed in the subject refinement mode, the target subject map (i.e., the regional map) is cut out from the image to be processed, and only the differential image corresponding to the target subject map / target subject map is sent to the cloud. In this way, for the subject refinement mode, the amount of data uploaded and returned between the end and the cloud is further reduced, thereby reducing the network traffic and processing delay of the transmitted image.

[0018] In one implementation, when the image refinement mode is the subject refinement mode, the region map of the image includes the target subject in the image, and the size of the region map of the image is smaller than the size of the image; when the second image refinement mode is the subject refinement mode, before the electronic device sends the first differential image to the server through the second request message, the method further includes: the electronic device obtains the position of the second region map in the second image, and crops the second region map from the second image; the above-mentioned electronic device determines the refined image of the second image based on the refined image of the second region map, including: based on the position of the second region map in the second image, the electronic device replaces the second region map in the second image with the refined image of the second region map, and obtains the refined image of the second image. In implementing the embodiment of the present application, when the image to be processed adopts the subject refinement mode, the refined image of the target subject map (i.e., the region map) is used to replace the target subject map in the image to be processed, so that the refined image of the image to be processed can be obtained.

[0019] In one implementation, the first request message includes a first photo retouching parameter, which is used to indicate at least one image processing method adopted for the second image; the above-mentioned server performs image processing on the second area image of the second image to obtain a refined image of the second area image, including: the server performs image processing on the second image according to at least one image processing method indicated by the first photo retouching parameter to obtain a refined image of the second area image.

[0020] In one implementation, the electronic device pre-stores a correspondence between multiple image processing methods and refinement modes, where the refinement modes include a full-image refinement mode and a subject refinement mode. The multiple image processing methods include multiple shooting modes, which include a portrait mode. The refinement mode corresponding to the portrait mode is the subject refinement mode. The image processing method used for the image is used to determine the image refinement mode. In implementing the embodiments of the present application, the refinement mode of the image to be processed can be determined based on the image processing method used for the image.

[0021] In one implementation, the first request message also includes an image identifier of the first region map; the second request message also includes a reference image identifier and a source image identifier of the first differential image, the reference image of the first differential image being the first region map, and the source image of the first differential image being the second region map; the server restores the second region map based on the first differential image and the first region map, including: the server restores the second region map based on the first differential image and the first region map indicated by the reference image identifier, and determines that the image identifier of the restored second region map is the source image identifier; the second response message includes the image identifier of the second region map. In implementing this embodiment of the present application, when uploading the differential image of the second region map, the reference image identifier of the differential image is uploaded so that the cloud can determine the reference image used to restore the second region map; and the source image identifier (i.e., the second region map) of the differential image is uploaded so that the cloud can determine the image identifier of the restored second region map.

[0022] In one implementation, the second request message also includes an algorithm identifier, which indicates a first restoration algorithm; the above-mentioned server restores the second area map based on the first differential image and the first area map, including: the server restores the second area map based on the first differential image, the first area map and the first restoration algorithm.

[0023] In one implementation, the image types include differential images and non-differential images; the first request message also includes a first image type, the first image type being used to indicate that the first region image is a non-differential image; the second request message also includes a second image type, the second image type being used to indicate that the first differential image is a differential image; the server restores the second region image based on the first differential image and the first region image, including: upon determining that the second image type is a differential image, the server restores the second region image based on the first differential image and the first region image. When implementing this embodiment of the present application, when uploading an image, the image type is also uploaded to facilitate the cloud-side determination of whether differential restoration of the image uploaded on the client side is required.

[0024] In one implementation, the electronic device sends a first area map of the first image to the server via a first request message, including: when the electronic device determines that the first image is not the non-first image in the continuous shooting scene, the electronic device sends the first area map within the refined image area of ​​the first image to the server via the first request message; the electronic device sends the first differential image to the server via a second request message, including: when the electronic device determines that the second image is the non-first image in the continuous shooting scene, the electronic device sends the first differential image to the server via the second request message.

[0025] In one implementation, when the second image meets any one of the three conditions, the second image is a non-first image in the continuous shooting scenario, and the above three conditions include: the second image is a non-first photo taken by the continuous shooting function; the shooting time interval between the second image and the first image is less than a time threshold; the similarity between the second image and the first image is greater than a similarity threshold.

[0026] In one implementation, when any one of the at least one image processing methods used for the second image corresponds to the subject refinement mode, the refinement mode of the second image is the subject refinement mode.

[0027] In one implementation, the electronic device pre-stores a correspondence between multiple subject types and refinement modes, and the first subject type among the multiple subject types corresponds to the subject refinement mode; determining the refinement mode of the second image as the subject refinement mode includes: identifying the target subject of the second image as the first subject type, and determining the refinement mode of the second image as the subject refinement mode corresponding to the first subject type.

[0028] In one implementation, the above-mentioned multiple image processing methods include some or all of the following: multiple shooting modes, multiple filters, multiple character special effects, multiple beauty options, high-definition restoration and high-definition portraits.

[0029] In one implementation, the first image and the second image are preview images captured by a camera of the electronic device; the method further includes: the electronic device displays a refined image of the first image in a preview frame; the electronic device displays a refined image of the second image in the preview frame.

[0030] In one implementation, the method further includes: when multiple images are selected, a second input operation is detected, and the second input operation is used to trigger image processing of the multiple images; the multiple images include a first image and a second image; the above-mentioned electronic device obtains the first image to be processed, and the electronic device obtains the second image to be processed, including: in response to the second input operation, the electronic device obtains the first image to be processed and obtains the second image to be processed.

[0031] In a second aspect, an embodiment of the present application provides an end-cloud collaborative image processing method, which is applied to an electronic device, and the method includes: the electronic device obtains a first image to be processed; the electronic device sends a first area map of the first image to a server through a first request message; the first area map includes images within a part or all area of ​​the first image; the electronic device obtains a second image to be processed, and the second area map includes images within a part or all area of ​​the second image; the electronic device sends a first differential image to the server through a second request message, and the first differential image is a differential image between the second area map of the second image and the first area map of the first image; the second request message is used to indicate the restoration of the second area map based on the first differential image, and to obtain a refined image of the second area map; the electronic device receives a second response message sent by the server, and the second response message is used to indicate the refined image of the second area map; the electronic device determines the refined image of the second image based on the refined image of the second area map.

[0032] In implementing the embodiment of the present application, for the second image to be processed, the terminal side can upload the image and the differential image of the first image, where the first image has been uploaded to the cloud before the second image or uploaded to the cloud at the same time as the second image; the cloud (i.e., the server) restores the second image based on the differential image and refines the second image. By collaborating with the cloud to refine the second image, the computing power requirements and load on the terminal side can be reduced; compared to uploading the second image, uploading the differential image can reduce the amount of image data transmitted between the terminal side and the cloud, thereby effectively reducing the data traffic of the image transmission and reducing the processing delay, and collaborating with the cloud to achieve efficient image processing, so that users can view the cloud-refined images in a timely manner on the terminal side, effectively improving the user experience.

[0033] In one implementation, the second response message includes a second differential image, which is a differential image between a refined image of the second region image and the second region image; the method also includes: the electronic device restoring the refined image of the second region image based on the second differential image and the second region image.

[0034] In one implementation, the first request message is used to instruct the server to obtain a refined image of the first area image; the method also includes: the electronic device receives a first response message sent by the server, the first response message is used to indicate the refined image of the first area image; the electronic device determines the refined image of the first image based on the refined image of the first area image.

[0035] In one implementation, the electronic device is provided with a continuous shooting function, and the first image and the second image are two images taken in one continuous shooting function; the method further includes: the electronic device detects a first input operation to start the continuous shooting function; the above-mentioned electronic device obtains the first image to be processed, and the electronic device obtains the second image to be processed, including: in response to the first input operation, the electronic device obtains the first image and the second image of the continuous shooting; the first image is the first image of the continuous shooting, and the second image is a non-first image of the continuous shooting.

[0036] In one implementation, the electronic device obtains a first image to be processed, including: in response to a detected first shooting instruction, the camera of the electronic device shoots the first image; the electronic device obtains a second image to be processed, including: in response to a detected second shooting instruction, the camera of the electronic device shoots the second image; the shooting time interval between the second image and the first image is less than a time threshold, and / or the similarity between the second image and the first image is greater than a similarity threshold.

[0037] In one implementation, the method also includes: the electronic device obtains a third image to be processed; the electronic device sends a third differential image to the server through a third request message, where the third differential image is a differential image between a third area image of the third image and a first area image of the first image; the third area image includes images within part or all of the area of ​​the third image; the third request message is used to indicate that the third area image is restored based on the third differential image, and a refined image of the third area image is obtained; the electronic device receives a third response message sent by the server, where the third response message is used to indicate a refined image of the third area image; the electronic device determines a refined image of the third image based on the refined image of the third area image.

[0038] In one implementation, the method also includes: the electronic device obtains a third image to be processed; the electronic device sends a third differential image to the server through a third request message, where the third differential image is a differential image between a third area image of the third image and a second area image of the second image; the third area image includes images within part or all of the area of ​​the third image; the third request message is used to indicate that the third area image is restored based on the third differential image, and a refined image of the third area image is obtained; the electronic device receives a third response message sent by the server, where the third response message is used to indicate a refined image of the third area image; the electronic device determines a refined image of the third image based on the refined image of the third area image.

[0039] In one implementation, the electronic device sends the first differential image to the server via a second request message, including: when the data volume of the first differential image is smaller than the data volume of the second area map, the electronic device sends the first differential image and the image identifier of the first area map to the server via the first request message; when the data volume of the second differential image is smaller than the data volume of the refined image of the second area map, the second response message includes the second differential image and the image identifier of the second area map, and the second differential image is a differential image between the refined image of the second area map and the second area map; when the data volume of the second differential image is smaller than the data volume of the refined image of the second area map, the second response message includes the refined image of the second area map.

[0040] In one implementation, when the image refinement mode is the full-image refinement mode, the regional map of the image includes the image content in the entire area of ​​the image; when the second image refinement mode is the full-image refinement mode, the second image and the second regional map are the same, and the refined map of the second regional map is the refined map of the second image.

[0041] In one implementation, when the image refinement mode is the subject refinement mode, the region map of the image includes the target subject in the image, and the size of the region map of the image is smaller than the size of the image; when the second image refinement mode is the subject refinement mode, before the electronic device sends the first differential image to the server through the second request message, the method also includes: the electronic device obtains the position of the second region map in the second image, and crops the second region map from the second image; the above-mentioned electronic device determines the refined image of the second image based on the refined image of the second region map, including: based on the position of the second region map in the second image, the electronic device uses the refined image of the second region map to replace the second region map in the second image, and obtains the refined image of the second image.

[0042] In one implementation, the first request message includes a first retouching parameter, which is used to indicate at least one image processing method used for the second image; the first request message is used to request the server to perform image processing on the second image according to at least one image processing method indicated by the first retouching parameter to obtain a refined image of the second area image.

[0043] In one implementation, the electronic device pre-stores a correspondence between multiple image processing methods and refinement modes, and the refinement modes include a full-image refinement mode and a subject refinement mode; the above-mentioned multiple image processing methods include multiple shooting modes, and the above-mentioned multiple shooting modes include a portrait mode, and the refinement mode corresponding to the portrait mode is the subject refinement mode; the image processing method adopted by the image is used to determine the refinement mode of the image.

[0044] In one implementation, the first request message also includes the image identifier of the first area map; the second request message also includes the reference image identifier and the source image identifier of the first differential image, the reference image of the first differential image is the first area map, and the source image of the first differential image is the second area map; the second response message includes the image identifier of the second area map.

[0045] In one implementation, the second request message further includes an algorithm identifier, where the algorithm identifier is used to instruct the server to use the first restoration algorithm to restore the second region map.

[0046] In a third aspect, an embodiment of the present application provides an end-cloud collaborative image processing method, which is applied to a server, and the method includes: the server receives a first area map of a first image sent by an electronic device through a first request message; the first area map includes images within a part or all area of ​​the first image; the server receives a first differential image sent by the electronic device through a second request message, and the first differential image is a differential image between the second area map and the first area map; the second area map includes images within a part or all area of ​​the second image; the server restores the second area map based on the first differential image and the first area map; the server performs image processing on the second area map to obtain a refined image of the second area map; the server sends a second response message to the electronic device, and the second response message is used to indicate the refined image of the second area map; the refined image of the second area map is used to determine the refined image of the second image.

[0047] In implementing the embodiment of the present application, for the second image to be processed, the terminal side can upload the image and the differential image of the first image, where the first image has been uploaded to the cloud before the second image or uploaded to the cloud at the same time as the second image; the cloud (i.e., the server) restores the second image based on the differential image and refines the second image. By collaborating with the cloud to refine the second image, the computing power requirements and load on the terminal side can be reduced; compared to uploading the second image, uploading the differential image can reduce the amount of image data transmitted between the terminal side and the cloud, thereby effectively reducing the data traffic of the image transmission and reducing the processing delay, and collaborating with the cloud to achieve efficient image processing, so that users can view the cloud-refined images in a timely manner on the terminal side, effectively improving the user experience.

[0048] In one implementation, the second response message includes a second differential image, which is a differential image between the refined image of the second area image and the second area image; the second response message is used to instruct the electronic device to restore the refined image of the second area image based on the second differential image and the second area image.

[0049] In one implementation, the method further includes: the server performing image processing on the first area image to obtain a refined image of the first area image; the server sending a first response message to the electronic device, the first response message being used to indicate the refined image of the first area image; the refined image of the first area image being used to determine the refined image of the first image.

[0050] In one implementation, the method further includes: the server receiving a third differential image sent by the electronic device through a third request message, the third differential image being a differential image between the third area map and the first area map; the third area map including images within part or all of the area of ​​the third image; the server restoring the third area map based on the third differential image and the first area map; the server performing image processing on the third area map to obtain a refined image of the third area map; the server sending a third response message to the electronic device, the third response message being used to indicate the refined image of the third area map; the refined image of the third area map being used to determine the refined image of the third image.

[0051] In one implementation, the method further includes: the server receiving a third differential image sent by the electronic device through a third request message, the third differential image being a differential image between the third area map and the second area map; the third area map including images within part or all of the area of ​​the third image; the server restoring the third area map based on the third differential image and the second area map; the server performing image processing on the third area map to obtain a refined image of the third area map; the server sending a third response message to the electronic device, the third response message being used to indicate the refined image of the third area map; the refined image of the third area map being used to determine the refined image of the third image.

[0052] In one implementation, when the data volume of the second differential image is smaller than the data volume of the refined image of the second area map, the second response message includes the second differential image and the image identifier of the second area map, and the second differential image is a differential image between the refined image of the second area map and the second area map; when the data volume of the second differential image is smaller than the data volume of the refined image of the second area map, the second response message includes the refined image of the second area map.

[0053] In one implementation, the first request message includes a first photo retouching parameter, which is used to indicate at least one image processing method adopted for the second image; the above-mentioned server performs image processing on the second area image of the second image to obtain a refined image of the second area image, including: the server performs image processing on the second image according to at least one image processing method indicated by the first photo retouching parameter to obtain a refined image of the second area image.

[0054] In one implementation, the first request message also includes an image identifier of the first area map; the second request message also includes a reference image identifier and a source image identifier of the first differential image, the reference image of the first differential image is the first area map, and the source image of the first differential image is the second area map; the above-mentioned server restores the second area map based on the first differential image and the first area map, including: the server restores the second area map based on the first differential image and the first area map indicated by the reference image identifier, and determines that the image identifier of the restored second area map is the source image identifier; the second response message includes the image identifier of the second area map.

[0055] In one implementation, the second request message also includes an algorithm identifier, which indicates a first restoration algorithm; the above-mentioned server restores the second area map based on the first differential image and the first area map, including: the server restores the second area map based on the first differential image, the first area map and the first restoration algorithm.

[0056] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory, wherein the memory is coupled to the processor, the memory is used to store computer program code, and the computer program code includes computer instructions. When the processor reads the computer instructions from the memory, the electronic device executes the end-cloud collaborative image processing method described in the second aspect.

[0057] In the fifth aspect, an embodiment of the present application provides a server, which includes: a processor and a memory, the memory being coupled to the processor, the memory being used to store computer program code, the computer program code including computer instructions, and when the processor reads the computer instructions from the memory, the electronic device executes the end-cloud collaborative image processing method described in the third aspect.

[0058] In the sixth aspect, an embodiment of the present application provides a computer-readable storage medium, including computer instructions. When the computer instructions are run on a device (for example, the electronic device of the fourth aspect, the server of the fifth aspect), the device executes the end-cloud collaborative image processing method described in any implementation method of any of the above aspects. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] FIG1 is a schematic diagram of a system architecture of a communication system provided in an embodiment of the present application;

[0060] 2A to 2C are image processing flow charts for a continuous shooting scenario according to an embodiment of the present application;

[0061] 3A to 3L are user interfaces related to the continuous shooting scenario provided by an embodiment of the present application;

[0062] 4A to 4F are user interfaces related to the continuous shooting scenario provided by an embodiment of the present application;

[0063] Figures 5A to 5H are user interfaces related to the continuous shooting scenario provided by an embodiment of the present application;

[0064] 6A to 6D are user interfaces related to the continuous shooting scenario provided by an embodiment of the present application;

[0065] FIG7A is a flow chart of a method for end-cloud collaborative image processing according to an embodiment of the present application;

[0066] FIG7B is a flowchart of a method for determining a non-first image in a continuous shooting scene according to an embodiment of the present application;

[0067] FIG8 is a diagram of a device architecture provided in an embodiment of the present application;

[0068] FIG9A is a flow chart of a method for end-cloud collaborative image processing according to an embodiment of the present application;

[0069] FIG9B is a schematic diagram of an image involved in the end-cloud collaborative image processing method provided in an embodiment of the present application;

[0070] FIG10A is a flow chart of a method for end-cloud collaborative image processing according to an embodiment of the present application;

[0071] FIG10B is a schematic diagram of an image involved in the end-cloud collaborative image processing method provided in an embodiment of the present application;

[0072] FIG11 is a schematic diagram of the structure of a terminal device provided in an embodiment of the present application;

[0073] FIG12 is a schematic diagram of the structure of the server provided in an embodiment of the present application. DETAILED DESCRIPTION

[0074] The following is a clear and detailed description of the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship between related objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0075] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to imply or suggest relative importance or implicitly indicate the number of the technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, unless otherwise specified, "plurality" means two or more.

[0076] The term "user interface (UI)" in the following embodiments of this application refers to a medium interface for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The user interface is a source code written in a specific computer language such as Java and extensible markup language (XML). The interface source code is parsed and rendered on an electronic device and finally presented as content that the user can recognize. The commonly used form of user interface is graphical user interface (GUI), which refers to a user interface related to computer operations that is displayed in a graphical manner. It can be a visual interface element such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc. displayed on the display screen of an electronic device.

[0077] The following introduces the communication system 10 involved in the end-cloud collaborative image processing method provided in an embodiment of the present application.

[0078] Figure 1 exemplarily shows the system architecture of a communication system 10 provided in an embodiment of the present application. As shown in Figure 1 , the communication system 10 includes a terminal device 100 and a server 200. The terminal device 100 can communicate with the server 200 via a communication network.

[0079] The communication network may include local area networks (LANs) and / or wide area networks (WANs). The communication network may be implemented using any known network communication protocol, which may be various wired or wireless communication protocols, such as Ethernet, universal serial bus (USB), FireWire, global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), Bluetooth, wireless fidelity (Wi-Fi), NFC, voice over Internet protocol (VoIP), a communication protocol supporting a network slicing architecture, or any other suitable communication protocol.

[0080] The terminal device 100 can be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, and can also be a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device (smart bracelet), a vehicle-mounted device, a smart home device (smart TV, smart screen, large-screen device, etc.) and / or a smart city device. The embodiment of the present application does not impose any special restrictions on the specific type of the terminal device 100. The terminal device 100 can also be referred to as an electronic device.

[0081] The server 200 may be a single server, a server cluster consisting of multiple servers, or a cloud computing center. The server 200 involved in the embodiment of the present application may also be referred to as a cloud server or a cloud.

[0082] It should be understood that Figure 1 is merely a schematic diagram of the system structure of the communication system provided in an embodiment of the present application, and does not constitute a specific limitation on the communication system 10. The communication system 10 may include more or fewer devices than shown in the figure. For example, it may also include wireless relay equipment and wireless backhaul equipment (not shown in Figure 1), which are not limited here.

[0083] In an end-cloud collaborative image processing method provided in an embodiment of the present application, the terminal device 100 can upload image a to the cloud for refinement, and the cloud then transmits the refined image of image a back to the end side.

[0084] In some embodiments of the present application, the image a may be a photo a captured in real time by the terminal device 100. When a user uses the camera of the terminal device 100 to take a photo, the terminal device 100 may automatically upload the captured photo a to the cloud for retouching, and the cloud will then transmit the retouched image of photo a back to the client. When the user views photo a, the terminal device displays the retouched image of photo a transmitted from the cloud to the user. In embodiments of the present application, a camera that supports automatic transmission of photos to the cloud for retouching when taking photos on the client side may be referred to as a cloud camera or a cloud photography mode.

[0085] In the above-mentioned end-cloud collaborative image processing method, the time-consuming steps include: uploading photos, image processing (i.e., retouching) on ​​the cloud, and transmitting back the retouched photos. Among them, the time taken to upload photos and transmit back the retouched photos is limited by the network speed and the size of the photos. When the image data volume of the photos is large and / or the network speed is average, it takes a long time; in particular, it takes even longer to upload photos due to the limitation of uplink bandwidth by mobile networks (such as the fifth generation mobile communication technology (5G)). For example, the 5G uplink bandwidth of 90% of users is 21Mbps. It takes 2.28S for a 6MB photo to be transmitted to the cloud, and 0.53s for the retouched photo to be transmitted back to the end side.

[0086] The aforementioned image processing method suffers from the following issues: the high data volume of images uploaded to the device and transmitted back to the cloud results in high data traffic consumption and high image processing latency on the device, which in turn prevents users from viewing the refined images in a timely manner. This is especially true in real-time cloud photography, which places even higher demands on image processing latency. These issues lead to a poor user experience.

[0087] The above problem is even more serious in continuous shooting scenarios. A continuous shooting scenario can be a high-frequency photo shooting scenario where the terminal device 100 continuously takes multiple photos, such as the first to nth photos in a continuous shooting sequence, and then performs fine-tuning on these photos. For example, see the end-cloud collaborative image processing flow in a continuous shooting scenario shown in FIG2A . In this scenario, the image processing delays for multiple photos are cumulative, resulting in a longer total processing time and a poor user experience.

[0088] In another end-cloud collaborative image processing method provided in an embodiment of the present application, the end side uploads multiple images to the cloud; for image a in a non-continuous shooting scenario or the first image a in a continuous shooting scenario (for example, the first photo of the continuous shooting shown in FIG2B ), the end side sends the complete image of image a to the cloud; the cloud returns the differential image of image a before and after refinement to the end side; the end side can restore the refined image of image a based on the differential image and image a. For any non-first image b in a continuous shooting scenario (for example, the nth photo of the continuous shooting shown in FIG2B , where n is greater than 1), the end side sends the differential image of image b and image c (for example, the i-th photo of the continuous shooting shown in FIG2B , where i is less than n and greater than or equal to 1) to the cloud; the cloud can restore image b based on the differential image and image c, and returns the differential image of image b before and after refinement to the end side; the end side can restore the refined image of image b based on the above differential image and image b. Among them, image c is the reference image used for difference of image b, and image c is an image that has been uploaded to the cloud before image b, or an image uploaded to the cloud at the same time as image b.

[0089] In one implementation, image c can be any image that has been uploaded to the cloud. Exemplarily, the terminal device 100 uploads the complete image of the first photo to the cloud for refinement; the terminal device 100 uploads the differential image of the second photo and the first photo to the cloud, and the cloud can restore the second photo based on the differential image and the first photo, and then refine the second photo. In this way, the cloud has obtained the first photo and the second photo. After taking the third photo, the terminal device 100 can upload the differential image of the third photo and the first photo to the cloud, and the cloud can restore the third photo based on the differential image and the first photo; or, the terminal device 100 can upload the differential image of the third photo and the second photo to the cloud, and the cloud can restore the third photo based on the differential image and the second photo. Similarly, when uploading the nth photo, the cloud has obtained any photo before the nth photo, such as the i-th photo; the terminal device 100 can upload the differential image of the nth photo and the i-th photo to the cloud, and the cloud can restore the nth photo based on the differential image and the i-th photo, and then refine the nth photo.

[0090] In one implementation, image c may be the aforementioned image a, that is, the image whose entire image is uploaded to the cloud.

[0091] In one implementation, referring to the image processing flow chart shown in FIG2C , image c is the previous image of image b, i.e., i equals n-1. Specifically, the terminal device 100 uploads the complete image of the first photo to the cloud for fine-tuning; the terminal device 100 uploads the differential image between the second photo and the first photo to the cloud, and the cloud can restore the second photo based on the differential image and the first photo, and then fine-tune the second photo; similarly, the terminal device 100 uploads the differential image between the nth photo (e.g., 3) and the n-1th photo (e.g., 2) to the cloud, and the cloud can restore the nth photo based on the differential image and the n-1th photo, and then fine-tune the nth photo.

[0092] By implementing the above-mentioned image processing method, the amount of differential image data uploaded on the end side is small, which effectively reduces the network traffic and latency for uploading photos; the amount of differential image data uploaded back from the cloud is also small, which effectively reduces the network traffic and latency for uploading photos; in the continuous shooting scenario, users can view the refined images in a timely manner, which effectively improves the user experience.

[0093] The uploaded image c involved in the embodiment of the present application refers to uploading the complete image / differential image of image c to the cloud; similarly, according to the aforementioned solution, when the differential image corresponding to image c is uploaded to the cloud, the cloud can restore the complete image c based on the differential image and the reference image corresponding to image c.

[0094] The "fine-tuning" involved in the embodiments of the present application refers to image processing using an image processing algorithm / model corresponding to a specific image processing method. The embodiments of the present application do not specifically limit the above-mentioned specific image processing method, which will be introduced in detail in subsequent embodiments and will not be repeated here.

[0095] The following introduces the application scenarios involved in the embodiments of the present application, and exemplifies the continuous shooting scene and the fine-tuning mode in combination with the application scenarios.

[0096] It should be noted that the end-cloud collaborative image processing method provided in the embodiments of the present application can be applied to two types of application scenarios. In the first type of application scenario, the image to be processed is an image captured in real time by the camera in cloud photography mode, and the terminal device 100 automatically uploads the image to the cloud for fine-tuning; the first type of application scenario includes the following application scenarios 1 to 3. In the second type of application scenario, the image to be processed is a locally stored image that is not captured in real time, and the user manually triggers the terminal device 100 to upload the image to the cloud for fine-tuning; the second type of application scenario includes the following application scenarios 4 and 5.

[0097] Among them, the above-mentioned locally stored images can be photos taken previously by the terminal device 100, or images obtained by the terminal device 100 through other means, such as images sent by other devices, images obtained by screenshots, images downloaded from the web page, etc., which are not specifically limited here.

[0098] Application scenario 1: Take multiple photos and retouch them using the continuous shooting function in cloud photo mode

[0099] In some embodiments, after the terminal device 100 installs APP1 (e.g., a camera APP), APP1 can automatically enable cloud photo mode. In some embodiments, after the terminal device 100 installs APP1, the user needs to manually enable cloud photo mode. For example, Figures 3A and 3B show an example of manually enabling cloud photo mode.

[0100] For example, Figure 3A shows a main interface 11 for displaying an installed application (APP). The terminal device 100 has a camera APP installed, and main interface 11 can display the camera APP's application icon 101. As shown in Figures 3A and 3B , upon detecting that a user has clicked on application icon 101, the terminal device 100 displays the camera APP's shooting interface 12.

[0101] The shooting interface 12 includes a preview box 102 , a shooting mode bar 103 , a camera switching control 104 , a shooting control 105 , an album control 106 and a cloud photo taking control 107 .

[0102] Among them, the preview box 102 is used to display the preview image captured by the camera of the terminal device 100 in a specific shooting mode. The shooting mode bar 103 is used to select the above shooting mode. The camera switching control 104 is used to switch the camera currently capturing the image. The shooting control 105 can receive user input operations (such as touch operations). In response to the above input operations, the camera APP can capture and save images based on the current shooting mode. The album control 106 is used to view the photos that have been taken.

[0103] The cloud photo control 107 is used to turn on / off the cloud photo mode. The cloud photo control 107 includes two states: on and off. The user can control the cloud photo control 107 to switch between the two states. The cloud photo control 107 shown in Figure 3B is in the off state. As shown in Figures 3B and 3C, an input operation (such as a click operation) acting on the cloud photo control 107 is detected. In response to the input operation, the terminal device 100 turns on the cloud photo mode and switches the cloud photo control 107 to the on state.

[0104] In some embodiments, after the cloud photo mode is turned on, if the terminal device 100 has a network, the taken photos will be uploaded to the cloud for refinement; if the terminal device 100 has no network, the taken photos will be refined locally.

[0105] The embodiment of the present application does not specifically limit the method of enabling the cloud photo mode. For example, the cloud photo mode can also be enabled through the application settings of the camera APP.

[0106] Exemplarily, as shown in FIG3B , the shooting mode bar 103 may include: night scene mode, large aperture mode, professional mode, photo mode 103A, video mode, portrait mode 103B, and the like. The shooting mode currently used for shooting shown in FIG3B is the photo mode, and the user can switch shooting modes. The shooting mode bar 103 also includes more options 103C. When the user clicks on more options, it can trigger the terminal device 100 to display more optional shooting modes, such as telephoto mode, landscape mode, panoramic mode, face special effects mode, and the like. Exemplarily, the portrait mode 103B is used to refine the characters in the photograph; the large aperture mode is used to blur the background of the target subject in the image and improve the clarity of the target subject; the landscape mode is used to refine the scenery in the photograph; and the face special effects mode is used to add special effects to the faces in the photograph.

[0107] Optionally, in a specific shooting mode, filter effects, beauty effects, face effects, makeup effects, body effects, etc. can also be superimposed. Exemplarily, in portrait mode 103B, a makeup effect is added. Exemplarily, as shown in Figures 3C and 3D, in photo mode 103A, the shooting interface 12 also includes a filter control 108; after detecting an input operation (such as a click operation) acting on the filter control 108, the camera APP displays a variety of filter options (such as a landscape filter 109), and one filter option displays a filter effect diagram and a filter name. Taking the landscape filter 109 as an example, after detecting the user's input operation of selecting the landscape filter 109, the camera APP can add a landscape filter to the image captured by the camera.

[0108] It is understood that in the embodiment of the present application, the camera app can perform fine-tuning on the image captured by the camera according to the image retouching parameters used when taking the photo. The above-mentioned image retouching parameters indicate one or more image processing methods selected by the user, such as the shooting mode, filter option, beauty option, makeup option, body option, and face special effect option. It is understood that one shooting mode can correspond to one image processing method, and one filter option can also correspond to one image processing method.

[0109] In an embodiment of the present application, the camera APP of the terminal device 100 is provided with a button or operation that supports a continuous shooting function, and the similarity of the photos taken by the continuous shooting function is usually very high; in the cloud shooting mode, when the continuous shooting function is started, the terminal device 100 can take multiple photos continuously and automatically upload the above multiple photos to the cloud for fine-tuning.

[0110] For example, as shown in Figures 3E and 3F , the terminal device 100 detects a user input operation to activate the continuous shooting function (e.g., long pressing the shooting control 105). In response to this input operation, the terminal device 100 begins to continuously shoot photos and displays an indicator 110 indicating the number of photos shot in the continuous shooting process. As shown in Figure 3F , the indicator 110 indicates that one photo has been shot in the continuous shooting process; as shown in Figure 3G , the indicator 110 indicates that two photos have been shot in the continuous shooting process. As shown in Figures 3H and 3I , when the indicator 110 indicates that six photos have been shot in the continuous shooting process, the terminal device 100 detects a user input operation to stop the continuous shooting process (e.g., stopping the long pressing of the shooting control 105). In response to this input operation, the terminal device 100 stops shooting photos in the continuous shooting process, saves the refined images of the six photos shot in the continuous shooting process, and displays a thumbnail of the cover image of the photos shot in the album control 106. The cover image can be the first photo in the continuous shooting process, or it can be the best image in the continuous shooting process determined by the terminal device 100 using a preset selection model.

[0111] As shown in Figures 3I and 3J, after detecting that the user clicks on the album control 106, the terminal device 100 displays the image display interface 13. The image display interface 13 includes an image display frame 201 and a continuous shooting viewing control 202. The image display frame 201 currently displays the cover image of the continuous shooting photos after cloud-based collaborative refinement, such as the refined image of the first image of the continuous shooting. As shown in Figures 3J and 3K, after detecting that the user clicks on the continuous shooting viewing control 202, the terminal device 100 displays the user interface 14. The user interface 14 includes thumbnails 203 of each image of the continuous shooting, such as the thumbnail 203A of the second image. As shown in Figures 3K and 3L, after detecting that the user clicks on the thumbnail 203A of the second image, the terminal device 100 displays the second image after cloud-based collaborative refinement in the image display frame 201.

[0112] In some embodiments, the terminal device 100 determines that the first photo a under a continuous shooting function is the first image in the continuous shooting scene, and uploads the first photo to the cloud for fine-tuning; the terminal device 100 determines that a non-first photo under a continuous shooting function (for example, photo b) is a non-first image in the continuous shooting scene, and uploads the difference image between photo b and photo c to the cloud for fine-tuning photo b. In one implementation, photo c is the previous photo of photo b under this continuous shooting function. In one implementation, photo c is any photo taken before photo b under this continuous shooting function (for example, the first photo a).

[0113] In some embodiments, the camera app of the terminal device 100 may provide a variety of image processing methods (e.g., multiple shooting modes, multiple makeup options, multiple filter options, multiple beauty options, multiple lighting effect options, multiple facial effects options, etc.) for the user to choose from in the shooting interface 12; the cloud stores the image processing algorithms / models corresponding to each image processing method. When the camera app of the terminal device 100 takes a photo and uploads the photo to the cloud, it also uploads the corresponding image retouching parameters of the photo. The image retouching parameters are used to indicate one or more image processing methods used when taking the photo, as well as the required image processing parameters; the cloud refines the photo according to the image processing algorithm / model corresponding to the image processing method indicated by the above-mentioned image retouching parameters to meet the user's shooting needs on the terminal side.

[0114] The embodiments of the present application do not specifically limit the image processing method provided by the camera APP of the terminal device 100, the process of the user selecting the image processing method, and the image processing algorithm / model corresponding to the image processing method.

[0115] For example, the user selects the portrait mode as the shooting mode; the photo editing parameters corresponding to the taken photo indicate the above-mentioned portrait mode; the cloud can refine the photo according to the image processing algorithm corresponding to the portrait mode.

[0116] For example, the user selects the shooting mode as the photo mode, and selects the landscape filter in the photo mode through the filter control 108; the photo editing parameters corresponding to the taken photo indicate the landscape filter in the photo mode; the cloud can refine the photo according to the image processing algorithm corresponding to the landscape filter in the photo mode.

[0117] For example, the user selects portrait mode as the shooting mode and adjusts the image processing parameters in portrait mode (such as skin smoothing parameters, face slimming parameters, etc.); the photo editing parameters corresponding to the taken photo indicate the above-mentioned portrait mode and the image processing parameters in the above-mentioned portrait mode; the cloud refines the photo according to the image processing algorithm corresponding to the portrait mode and the above-mentioned image processing parameters.

[0118] Application scenario 2: Take a single photo in cloud photo mode using the non-continuous shooting function and then retouch it

[0119] In the embodiment of the present application, in the cloud photo mode, the terminal device 100 takes a single photo through the shooting control 105 of the shooting interface 12, and each photo is automatically uploaded to the cloud for fine-tuning.

[0120] Exemplarily, the user controls the terminal device 100 to take photos c and b in succession. The image processing methods (e.g., shooting modes, filter options) selected for taking photos c and b may be the same or different. As shown in Figures 4A and 4B, the user's input operation (e.g., a click operation) on the portrait mode 103B is detected, and the terminal device 100 switches the shooting mode to portrait mode. As shown in Figure 4B, in portrait mode, when the user's shooting operation is detected (e.g., clicking the shooting control 105), the camera APP takes photo c, obtains and saves the refined image of photo c collaboratively refined in the cloud. As shown in Figure 4C, when the user's shooting operation is detected, the terminal device 100 takes photo b, obtains and saves the refined image of photo b collaboratively refined in the cloud. As shown in Figures 4D and 4E, the user's operation of clicking the album control 106 is detected, and the terminal device 100 displays the refined image of photo b on the image display interface 13; as shown in Figures 4E and 4F, the user slides photo b to the left to view the refined image of the previously taken photo c.

[0121] In some embodiments, when taking photo b, if the terminal device 100 confirms that photo b meets at least one of the following conditions: "the shooting time interval between photo b and photo c is less than a time threshold (for example, 0.5s); the similarity between photo b and photo c is greater than a similarity threshold (for example, 80%)", then photo b is determined to be a non-first image in a continuous shooting scenario, and the differential image between photo b and photo c is uploaded to the cloud for fine-tuning photo b; otherwise, photo b is determined to be an image in a non-continuous shooting scenario, and the complete image of photo b is uploaded to the cloud for fine-tuning.

[0122] In some embodiments, when taking photo b, if the terminal device 100 confirms that photo b satisfies "the shooting time interval between photo b and photo c is less than the time threshold, and the similarity between photo b and photo c is greater than the similarity threshold", then photo b is determined to be a non-first image in the continuous shooting scenario.

[0123] In one implementation, photo c is the most recent photo uploaded to the cloud by the terminal device 100 before photo b. In one implementation, photo c can be any photo uploaded to the cloud by the terminal device 100 within a preset time (e.g., 1 minute) before photo b. In one implementation, the terminal device 100 traverses the similarities between the photos uploaded to the cloud and photo b in descending order of their shooting time, and photo c is the first photo whose similarity is greater than a similarity threshold.

[0124] Similarly, the image processing method and retouching parameters for application scenario 2 can refer to the relevant description of application scenario 1 and will not be repeated here.

[0125] In some embodiments, in the aforementioned application scenarios 1 and 2, the terminal device 100 refines the preview image captured by the camera on the terminal side and displays the refined preview image on the terminal side in the preview frame 102; uploads the photo taken in response to the user's shooting operation to the cloud for refinement, and displays the refined photo on the cloud side on the image display interface 13. In one implementation, due to the limited load capacity of the terminal device 100, for the same image processing method, the terminal side adopts an image processing algorithm / model with a lower load requirement than the cloud side; using the same image processing method to refine the photo, the image quality of the cloud-side refined photo is higher than that of the terminal-side refined photo. For example, referring to Figures 3A to 3K, the preview frame 102 of Figure 3D shows a preview image without a landscape filter; the preview frame 102 of Figure 3E shows a locally refined preview image with a landscape filter added, and the image quality of the preview image is higher than that of the unrefined preview image; the image display frame 201 of Figure 3J shows a photo taken by the camera with a landscape filter refined on the cloud side, and the image quality of the photo is higher than that of the locally refined preview image.

[0126] Application scenario three: Refine each preview image captured by the camera in cloud photography mode

[0127] In some embodiments, the terminal device 100 can also upload the preview image captured by the camera to the cloud for refinement in real time, and display the preview image after cloud collaborative refinement in the preview box 102, so that the user can preview the cloud-refined effect of the image through the preview box 102 of the shooting interface 12. It can be understood that the refinement of the preview image has higher requirements for image processing latency. Only when the image processing latency is guaranteed to be within a low latency range can the user preview the refined image in a timely manner through the preview box 102.

[0128] In some embodiments, the terminal device 100 confirms that the first preview image a captured by the camera after starting the shooting interface 12 is the first image in the continuous shooting scene, and uploads the first preview image to the cloud for fine-tuning; determines that the preview image b after the first preview image captured by the above-mentioned camera is a non-first image in the continuous shooting scene, and uploads the differential image between the preview image b and the preview image c to the cloud for fine-tuning the preview image b.

[0129] In one implementation, preview image c is the previous preview image of preview image b after the current start of the shooting interface 12. In one implementation, preview image c is any preview image captured before preview image b after the current start of the shooting interface 12, such as the first preview image a.

[0130] Similarly, when uploading a preview image, the corresponding retouching parameters of the preview image are also uploaded. The retouching parameters indicate the image processing method used by the camera APP when capturing the preview image. Specifically, the above-mentioned image processing method and retouching parameters can refer to the relevant description of application scenario one, which will not be repeated here. It should be noted that when capturing preview image a, preview image c, and preview image c, the image processing method (such as shooting mode, filter options) adopted by the camera APP can be the same or different.

[0131] It should be noted that Figures 3A to 4F merely illustrate the user interfaces of the camera app on the terminal device 100 and should not limit the embodiments of the present application. The aforementioned interfaces may include more or fewer controls. The aforementioned APP1 may be the system camera application of the terminal device 100, or may be another system application or third-party application with a camera function, such as an instant messaging application with a camera function, without specific limitation herein.

[0132] Application Scenario 4: One-click refinement of multiple local images

[0133] In some embodiments, the APP2 of the terminal device 100 (e.g., the photo album APP) provides a one-click fine-tuning function for multiple images. When the user's input operation for one-click fine-tuning of multiple images is detected, the terminal device 100 uploads the multiple images to the cloud for fine-tuning.

[0134] Exemplarily, FIG. 5A to FIG. 5H show a user interface related to one-click refinement of multiple images.

[0135] Figure 5A shows the image display interface 15 of the photo album APP, and the image display interface 15 displays multiple images stored locally. As shown in Figures 5A and 5B, it is detected that the user long presses an image (for example, image d) in the image display interface 15, and the terminal device 100 displays a selection control on each image, and the selection control 301 of image d is in a selected state, and the selection controls of other images are in an unselected state; by clicking the selection control, the control can be switched between the selected state and the unselected state. After detecting that the user long presses an image in the image display interface 15, a menu bar 302 is also displayed, and the menu bar 302 displays a sharing control, a collection control, a deletion control, a creation control 302A and more controls. As shown in Figures 5C and 5D, after the user selects multiple images through the selection control, the terminal device 100 detects that the user clicks on the creation control 302A; in response to the click operation, the terminal device 100 displays the creation menu bar 303, and the creation menu bar 303 includes a one-key editing control 303A. As shown in Figures 5D and 5E , after detecting that a user has clicked on the one-touch image editing control 303A, the terminal device 100 displays an editing bar 304 in the user interface 16. The editing controls in the editing bar 304 are used to perform specific image processing on the image, such as a beauty control, a filter control, a high-definition repair control 304A, a character special effects control, etc. For example, the beauty control is used to trigger the terminal device 100 to display various beauty options for adding beauty effects to characters in the image; the filter control is used to trigger the terminal to display various filter options for adding filter effects to the image; the high-definition repair control 304A is used to repair image content to improve content clarity and visual effects; and the character special effects control is used to trigger the terminal device 100 to display various character special effects options for adding character special effects to characters in the image.

[0136] Taking the HD restoration control 304A as an example, as shown in Figures 5E and 5F , upon detecting that a user has clicked on the HD restoration control 304A, the terminal device 100 uploads the multiple images selected by the user to the cloud for refinement and displays the refined images of the multiple images collaboratively refined on the cloud. It also displays an OK control 306 and a Cancel control 305 . The OK control 306 is used to confirm the HD restoration of the image, and the Cancel control 305 is used to cancel the HD restoration of the image. As shown in Figures 5F and 5G , upon detecting that a user has clicked on the OK control 306 , the terminal device 100 displays a Save control 307 on the user interface 16 . As shown in Figures 5G and 5H , upon detecting that a user has clicked on the Save control 307 , the terminal device 100 saves the refined images of the multiple images and displays them on the image display interface 15 .

[0137] In some embodiments, the attribute parameters of the images in the album include file time, the multiple images are sorted by file time, and the terminal device 100 sequentially determines whether each image is the first image of the continuous shooting scene. In some embodiments, the multiple images are sorted according to the order in which the user selected the images, and each image is sequentially determined to be the first image of the continuous shooting scene.

[0138] In some embodiments, the first image of the above-mentioned multiple images is used as the first image of the continuous shooting scene; for the non-first image among the above-mentioned multiple images (for example, image b), if the terminal device 100 confirms that image b meets any of the following conditions: "the similarity between image b and image c is greater than the similarity threshold, and the shooting time interval between image b and image c is less than the time threshold", then image b is determined to be the non-first image in the continuous shooting scene, and the difference image between image b and image c is uploaded to the cloud for fine-tuning image b; otherwise, image b is determined to be an image in a non-continuous shooting scene, and image b is uploaded to the cloud for fine-tuning.

[0139] In some embodiments, if the terminal device 100 confirms that image b satisfies "the similarity between image b and image c is greater than the similarity threshold, and the shooting time interval between image b and image c is less than the time threshold", it is determined that image b is not the first image in the continuous shooting scenario.

[0140] In one implementation, the image c is the previous image of the image b in the plurality of images. In one implementation, the image c is any image before the image b in the plurality of images.

[0141] In one implementation, the attribute parameters of the locally stored image b may indicate the source of image b. For example, the image name of image b obtained by screenshot includes "screenshot," and the image name of a captured photo includes "IMG." It will be appreciated that if image b is a photo taken with a camera, the file time of image b may include the time when image b was captured.

[0142] Application Scenario 5: Refinement of a local single image

[0143] In an embodiment of the present application, APP2 (e.g., an album APP) of the terminal device 100 provides a function for refining a single image. When the user's input operation on image b is detected, the terminal device 100 uploads image b to the cloud for refining.

[0144] For example, the terminal device 100 refines image c and image b successively; Figures 6A to 6D show a user interface related to refining a single image. The image processing methods of image c and image b can be the same or different.

[0145] As shown in Figure 6A, the image display interface 15 of the photo album app displays locally stored images c and b. After the user triggers the terminal device 100 to perform a fine-tuning on image c, the image display interface 15 displays the fine-tuned image of image c. As shown in Figures 6A and 6B, upon detecting that the user clicks on image b, the terminal device 100 displays the image display interface 13 for image b. Image display interface 13 displays image b and editing controls 401. As shown in Figures 6B and 6C, upon detecting that the user clicks on editing controls 401, the terminal device 100 displays an editing bar 402 on the image editing interface 17. The editing controls in editing bar 402 are used to perform image processing on image b, such as beauty controls, filter controls, high-definition portrait controls 402A, and character special effects controls. The high-definition portrait controls 402A are used to repair characters in the image to improve character clarity and visual effects. Exemplarily, as shown in Figures 6C and 6D, taking the high-definition portrait control 402A as an example, after detecting that the user clicks the high-definition portrait control 402A, the terminal device 100 uploads image b to the cloud for refinement, and displays the refined image of image b after refinement, and also displays a confirmation control 403 and a cancel control 404; the confirmation control 403 is used to confirm the repair of the image, and after confirming the repair, the above-mentioned refined image can be saved to the album; the cancel control 404 is used to cancel the repair of the image.

[0146] In some embodiments, in application scenario five, for the specific implementation of determining whether image b is a non-first image in a continuous shooting scene, reference can be made to the relevant description of image b in application scenario four, which will not be repeated here. The above specific implementation involves image c. In one implementation, image c is the last image uploaded to the cloud for refinement. In one implementation, image c is any image that has been uploaded to the cloud for refinement. In one implementation, image c is any image that has been uploaded to the cloud for refinement within a preset time period (for example, 10 minutes).

[0147] Similarly, in application scenarios four and five, the photo album APP provides a variety of local image processing methods (such as multiple filter options, multiple beauty options, multiple makeup options, multiple character special effects options, high-definition restoration options, etc.) for users to choose from, and the cloud stores the image processing algorithms / models corresponding to each image processing method. When the photo album APP of the terminal device 100 uploads the local image to the cloud for fine-tuning, it also uploads the corresponding retouching parameters of the local image. The retouching parameters indicate the above-mentioned image processing method. Specifically, the retouching parameters and image processing methods can refer to the relevant description of application scenario one.

[0148] It should be noted that Figures 5A to 6D only illustrate the user interface of the photo album APP on the terminal device 100 and should not constitute a limitation on the embodiments of the present application. The above interface may include more or fewer controls. The above APP2 may be the system photo album application of the terminal device 100, or it may be another system application or a third-party application that has the function of refining local images.

[0149] Not limited to the above five application scenarios, the end-cloud collaborative image processing method provided in the embodiment of the present application can also be applied to other application scenarios that require uploading images to the cloud, and no specific limitations are made here.

[0150] In some embodiments, the refinement mode can be divided into full-image refinement and subject refinement; in full-image refinement mode, the image refinement area includes the entire area of ​​the image; in subject refinement mode, the image refinement area includes the display area of ​​the target subject in the image, and the size of the refinement area is smaller than the image size. Before uploading the image to the cloud, the end side can identify the refinement mode of the image to be processed; in full-image refinement mode, the complete image of the image to be processed / the differential image of the complete image is uploaded to the cloud; in subject refinement mode, the target subject in the image to be processed is identified, the end side cuts out the target subject image from the image to be processed, and only sends the target subject image / the differential image of the target subject image to the cloud; the cloud returns the differential image of the target subject image before and after refinement to the end side; based on the differential image and the target subject image, the end side can restore the refined image of the target subject image; by replacing the target subject image in the image to be processed with the refined image of the target subject image, the refined image of the image to be processed can be obtained. In this way, for the subject refinement mode, the amount of data uploaded and returned images is further reduced, thereby reducing the required network traffic and delay for uploading and returning images, effectively improving the user experience.

[0151] In combination with the above application scenarios, the refinement mode is exemplified.

[0152] In some embodiments, the client side pre-stores a correspondence between image processing methods and retouching modes. The image processing methods for the image to be processed may include one or more of the following: shooting mode, filter, character special effects, HD restoration, facial enhancement, body enhancement, HD portrait, etc.; the retouching modes corresponding to different image processing methods may be the same or different.

[0153] For example, the shooting mode may include one or more of portrait mode, large aperture mode, night mode, landscape mode, professional mode, etc. Portrait mode and large aperture mode correspond to subject refinement mode, night mode, landscape mode, and professional mode correspond to full-image refinement mode; various filter options correspond to full-image refinement mode; various beauty options correspond to full-image refinement mode; various character special effects options correspond to full-image refinement mode; high-definition restoration corresponds to full-image refinement mode; and high-definition portrait corresponds to subject refinement mode. Specifically, application developers can set the correspondence between image processing methods and refinement modes according to actual needs, which is not specifically limited here. If there are multiple image processing methods for the image to be processed, and the refinement modes corresponding to the above-mentioned multiple image processing methods include both full-image refinement and subject refinement, the full-image refinement mode is used for the image. For example, the image processing methods for the image to be processed include portrait mode and filter 1, portrait mode corresponds to subject refinement mode, and filter 1 corresponds to full-image refinement mode. The refinement mode of the image is determined to be full-image refinement mode, and there is no need to cut the target subject image.

[0154] For example, referring to Figures 3C and 3D, the user selects the landscape filter in the photo mode to take pictures, and the photos taken under the landscape filter use the full-image refinement mode; comparing the preview image before selecting the landscape filter shown in Figure 3C, and the refined images of the photos taken under the landscape filter shown in Figures 3J to 3L, it can be seen that the photos use the full-image refinement mode.

[0155] For example, referring to Figures 4A to 4E, the terminal device 100 takes a photo in portrait mode, and the target subject of the photo is a person; comparing the preview image before selecting the portrait mode shown in Figure 4A, and the refined image of the photo taken in portrait mode shown in Figure 4E, it can be seen that the photo uses the subject refinement mode and only the person in the photo is refined.

[0156] In some embodiments, a pre-stored correspondence between subject types and refinement modes is available. Subject types can include landscapes, people, animals, buildings, cities, and so on. The client can intelligently identify the subject type of the target subject in the image to be processed. For example, the refinement mode for landscapes, buildings, and cities is the full refinement mode; the refinement mode for people and animals is the main refinement mode.

[0157] In some embodiments, the terminal device 100 determines that the refinement mode of the image to be processed is the subject refinement mode only when the subject type of the target subject in the image to be processed corresponds to the subject refinement mode and the proportion of the display area of ​​the target subject in the image to be processed is less than a preset proportion (for example, 80%); otherwise, it is the full image refinement mode.

[0158] In an embodiment of the present application, the image within the refined area of ​​the image to be processed can be referred to as a region map; in the full image refinement mode, the region map of the image to be processed is the image to be processed; in the subject refinement mode, the region map of the image to be processed is the target subject map cut out from the image to be processed.

[0159] In the end-cloud collaborative image processing method provided in the embodiment of the present application, for image a in a non-continuous shooting scenario or the first image a in a continuous shooting scenario, the terminal device 100 sends a complete image of the region map of image a to the cloud; receives the differential images of the region map before and after refinement sent by the server 200, and restores the refined image of image a based on the differential images. For a non-first photo b in a continuous shooting scenario, the terminal device 100 sends a differential image of the region map of image b and the region map of the reference image (i.e., image c) to the cloud, and the differential image is used to restore the region map of image b; receives the differential images of the region map before and after refinement sent by the cloud, and restores the refined image of image b based on the differential images.

[0160] Image C is the baseline image for differential analysis with Image B. Image C is an image that has already been uploaded to the cloud, or an image uploaded to the cloud together with Image B. For example, Image C is Image A. This effectively reduces image transmission data traffic and processing latency while enabling efficient image processing in collaboration with the cloud. This allows users to instantly view the refined images on the cloud side, effectively improving the user experience.

[0161] 7A shows a flowchart of a method for end-cloud collaborative image processing, which includes steps S101 to S124. The method includes the following three stages: end-side upload processing stage, cloud processing stage, and end-side backhaul processing stage.

[0162] Phase 1: End-side upload processing

[0163] S101. The terminal device 100 obtains the current image to be processed.

[0164] The current image to be processed may be image a, image b or image c of any of the aforementioned application scenarios.

[0165] Exemplarily, referring to the relevant descriptions of the aforementioned application scenarios one and two, the image to be processed may be a photo taken by the camera APP of the terminal device 100; when a user's shooting operation is detected, the camera APP obtains the image to be processed taken by the camera. Exemplarily, referring to the relevant descriptions of the aforementioned application scenario three, the image to be processed may be a preview image captured by the camera APP of the terminal device 100; after detecting that the shooting interface 12 for displaying the preview image is running, the camera APP obtains the image to be processed captured by the camera. Exemplarily, referring to the relevant descriptions of the aforementioned application scenarios four and five, the image to be processed is an image stored locally on the terminal device 100; when a user operation that triggers the refinement of the local image is detected, the album APP uses the image as the image to be processed.

[0166] S102. The terminal device 100 identifies whether the refinement mode of the image to be processed is the subject refinement mode; if not, execute S103; if so, execute S104.

[0167] S103 : The terminal device 100 determines that the refinement mode of the image to be processed is the full-image refinement mode, and the region 1 of the image to be processed is the image to be processed itself.

[0168] S104 , the terminal device 100 determines that the region image 1 of the image to be processed is the target main image in the image to be processed, cuts the region image 1 in the image to be processed, and records the position of the region image 1 in the image to be processed.

[0169] In some embodiments, the terminal device 100 identifies the target subject in the image to be processed, determines that the refined area includes the display subject, and that the refined area is greater than or equal to the display area of ​​the target subject.

[0170] The embodiment of the present application does not specifically limit the implementation method of the position of the indication area diagram 1 in the image to be processed.

[0171] In some embodiments, in the subject refinement mode, region image 1 (i.e., the target subject image) is rectangular. The position of region image 1 in the image to be processed is indicated by the coordinates of its upper left corner and lower right corner; alternatively, the position of region image 1 in the image to be processed is indicated by the coordinates of its upper left corner, as well as its height and width.

[0172] In some embodiments, in subject refinement mode, the edge of region image 1 (i.e., the target subject image) is formed by the edge line of the target subject in the image to be processed. That is, the shape of region image 1 is the shape of the target subject. The coordinates of each pixel on the edge line of the target subject indicate the position of region image 1 in the image to be processed.

[0173] In some embodiments, steps S102 to S104 do not need to be performed, that is, there is no need to determine the refinement mode. For any image to be processed, the complete image or the differential image of the complete image is uploaded to the cloud.

[0174] S105. The terminal device 100 identifies whether the image to be processed is a non-first image in a continuous shooting scenario; if not, execute S106; if so, execute S107.

[0175] In some embodiments, when the image to be processed satisfies any one of the following conditions 1 to 3, the image to be processed is a non-first image in a continuous shooting scene; otherwise, it is not a non-first image in a continuous shooting scene.

[0176] Condition 1: The image to be processed is not the first image taken in the continuous shooting function.

[0177] Condition 2: The shooting time interval between the image to be processed and image c is less than a time threshold (eg, 0.5 s).

[0178] Condition 3: The similarity between the image to be processed and image c is greater than a similarity threshold (eg, 80%).

[0179] In some embodiments, the image to be processed adopts the subject refinement mode, and condition 3 specifically includes: the similarity between the region map of the image to be processed (ie, the target subject map) and the region map of image c is greater than a similarity threshold.

[0180] Image c and the image to be processed use the same refinement mode; image c is an image uploaded to server 200 before the image to be processed, or uploaded to server 200 simultaneously with the image to be processed. Image c can be a non-first image in a continuous shooting scenario (e.g., image a). Uploading image c to server 200 means uploading a differential image corresponding to the region map of image c to server 200. The cloud can then restore the complete image of the region map of image c based on this differential image. Image c can also be a non-first image in a continuous shooting scenario. Uploading image c to server 200 means uploading the complete image of the region map of image c to server 200.

[0181] Exemplarily, the image to be processed is image a, which does not meet any of the aforementioned conditions and is not the first image in a continuous shooting scenario. The image to be processed is image b, which meets at least one of the aforementioned conditions and is not the first image in a continuous shooting scenario.

[0182] In one implementation, in condition 2 and / or condition 3, image c is the last image uploaded to server 200. In one implementation, in condition 3, image c can be any image uploaded to server 200 within a preset time period (e.g., 10 minutes). Specifically, images uploaded to server 200 within the preset time period are traversed in ascending order of upload time to determine whether image c meets condition 3. In one implementation, in condition 3, image c can be any image uploaded to server 200 at the same time as the image to be processed. Specifically, images uploaded to server 200 at the same time are traversed to determine whether image c meets condition 3.

[0183] For example, taking the image to be processed as image b as an example, the aforementioned application scenarios one to five describe in detail how to determine whether image b is a non-first image in a continuous shooting scenario, which will not be repeated here.

[0184] In one implementation, image c is the image to be processed that was previously the image to be processed. For example, in the aforementioned application scenarios 1 and 2, image c can be the previous photo taken by the camera; in the aforementioned application scenario 3, image c can be the previous preview image captured by the camera; in the aforementioned application scenarios 4 and 5, image c is the previous image to be processed based on the file time or the time the user selected the image; and in the aforementioned application scenario 5, image c can be the previous image uploaded to the cloud.

[0185] In some embodiments, as shown in FIG. 7B , step S105 may specifically include steps D1 to D3 .

[0186] D1. Determine whether the image to be processed is a non-first photo taken with the continuous shooting function; if so, the image to be processed is a non-first image in the continuous shooting scene; if not, that is, the image to be processed is the first photo taken with the continuous shooting function / a photo not taken with the continuous shooting function, then execute the next step.

[0187] D2. Determine whether the shooting time interval between the image to be processed and the previous image to be processed is less than a time threshold; if so, the image to be processed is not the first image in the continuous shooting scene; otherwise, proceed to the next step.

[0188] D3. Determine whether the similarity between the image to be processed and the previous image to be processed is greater than a similarity threshold; if so, the image to be processed is a non-first image in the continuous shooting scene; otherwise, determine that the image to be processed is not a non-first image in the continuous shooting scene.

[0189] The embodiment of the present application does not specifically limit the execution order of step S102 and step S105. In some embodiments, step S105 may be executed first to determine the non-first image of the continuous shooting scene, and then step S102 may be executed to identify the fine-tuning mode.

[0190] S106. The image to be processed is not the non-first image in the continuous shooting scene. The terminal device 100 uploads a request message to the server 200. The request message includes area map 1, the image ID of area map 1 and the image type of area map 1. The image type indicates that area map 1 is a non-differential image.

[0191] In step S106 , in the full image refinement mode, the terminal device 100 uploads the image to be processed to the server 200 ; in the subject refinement mode, the terminal device 100 uploads the target subject image in the image to be processed to the server 200 .

[0192] S107 . The terminal device 100 obtains a differential image 1 between the region image 1 of the image to be processed and the reference image.

[0193] Differential image 1 = source image (i.e., region 1 of the image to be processed) - reference image. In this embodiment of the present application, the terminal device 100 selects, according to a preset rule, a reference image for the image to be processed from images already uploaded to the server 200 or images uploaded to the cloud together. The reference image and the image to be processed are typically quite similar. The image to be processed and the reference image to be processed typically use the same refinement mode.

[0194] In full-image refinement mode, Region 1 is the image to be processed. If the image to be processed meets Condition 1 above and is a photo taken with the continuous shooting function, the reference image for the image to be processed can be the previous photo in the continuous shooting process, the first photo in the continuous shooting process, or any photo before the image to be processed. The previous photo in the continuous shooting process will be used as an example for further explanation. If the image to be processed meets Conditions 2 and / or 3 above, the reference image for the image to be processed is Image C. For example, in Application Scenario 2, Image C is the previous photo taken with the camera.

[0195] In the subject refinement mode, the reference image of the region map 1 (ie, the target subject map) of the image to be processed is the region map (ie, the target subject map) of the reference image of the image to be processed.

[0196] S108 , the terminal device 100 determines whether the data volume of the differential image 1 is smaller than the data volume of the regional image 1 ; if so, execute S109 ; otherwise, execute S106 .

[0197] Step S108 is optional. In some embodiments, step S109 is directly executed after step S107 without executing S108.

[0198] S109 , the terminal device 100 uploads a request message to the server 200 , including the differential image 1 , the image ID of the differential image 1 , the source image ID, the reference image ID, and the image type, where the image type indicates that the differential image 1 is a differential image.

[0199] The source image corresponding to the differential image 1 is the region image 1 of the image to be processed, the source image ID is the image ID of the source image, and the reference image ID is the image ID of the reference image.

[0200] It can be understood that if the data volume of differential image 1 is larger than that of region map 1 of the image to be processed, region map 1 is still uploaded to server 200; if the data volume of differential image 1 is smaller than that of region map 1, differential image 1 is uploaded to server 200.

[0201] Phase 2: Cloud processing

[0202] S110. The server 200 receives a request message.

[0203] S111. The server 200 determines whether the image type in the request message is a differential image; if so, executes S112; otherwise, executes S113.

[0204] S112: When the image type is a differential image, the server 200 restores the region image 1 of the image to be processed according to the reference image ID in the request message and the differential image 1; the server 200 determines that the image ID of the restored region image 1 is the source image ID in the request message.

[0205] In an embodiment of the present application, if the image type is a differential image, the differential image carried by the request message needs to be restored to a region map of the image to be processed; if the image type is a non-differential image, it indicates that the request message carries the region map of the image to be processed, and no differential restoration is required.

[0206] In some embodiments, when the image type is a differential image, the request message also carries a differential algorithm identifier. Terminal device 100 uses the differential algorithm indicated by the differential algorithm identifier to obtain differential image 1 of the two images. Server 200 determines the restoration algorithm corresponding to the differential algorithm indicated by the differential algorithm identifier, obtains the reference image indicated by the reference image ID, and then uses the restoration algorithm, the reference image, and differential image 1 to restore region image 1 of the image to be processed. Source image (i.e., region image 1 of the image to be processed) = differential image 1 + reference image.

[0207] In some embodiments, the terminal device 100 and the server 200 pre-negotiate to use a specific differential algorithm, and the request message does not need to carry a differential algorithm identifier.

[0208] The embodiments of the present application do not specifically limit the difference algorithm involved. For example, the difference algorithm can be an absolute value difference method, an inter-frame difference method (absDiff), a relative difference method, a threshold difference method, a normalized difference method, or a Gaussian difference method, etc.

[0209] S113 : The server 200 records the region map 1 and the image ID of the region map 1 , and obtains a refined image of the region map 1 of the image to be processed.

[0210] In some embodiments, the request message carries retouching parameters of the image to be processed, and the server 200 refines the region 1 of the image to be processed according to the retouching parameters to obtain a refined image of the region 1. Specifically, the retouching parameters can be referred to the relevant description of the aforementioned application scenario and will not be repeated here.

[0211] S114: The server 200 uses the region image 1 of the image to be processed as the reference image and obtains a difference image 2 before and after the refinement of the region image 1. Here, the difference image 2 = the source image (i.e., the refined image of the region image 1) - the reference image (i.e., the region image 1).

[0212] S115 , the server 200 determines whether the data size of the differential image 2 is smaller than the data size of the refined image of the regional image 1 ; if so, execute S116 ; otherwise, execute S117 .

[0213] Step S115 is optional. In some embodiments, step S116 is directly executed after step S114 without executing S115.

[0214] S116 . The server 200 returns a response message to the terminal device 100 . The response message includes the difference image 2 , the image ID of the difference image 2 , the reference image ID, and the image type. The image type indicates that the difference image 2 is a difference image.

[0215] S117. The server 200 transmits a response message back to the terminal device 100. The response message includes the refined image of the area image 1, the image ID of the area image 1, and the image type. The image type indicates that the refined image is a non-differential image.

[0216] It can be understood that if the differential image 2 is smaller than the data size of the refined image, the differential image 2 is transmitted back to the terminal device 100; if the differential image 2 is greater than or equal to the data size of the refined image, the refined image is directly transmitted back.

[0217] Phase 3: End-side backhaul processing

[0218] S118. The terminal device 100 receives a response message.

[0219] S119. The terminal device 100 determines whether the image type in the response message is a differential image; if so, execute S120; otherwise, execute S121.

[0220] S120: Restore the refined image of region 1 of the image to be processed based on the reference image ID and the differential image 2. Here, the source image (i.e., the refined image of region 1) = differential image 2 + reference image (i.e., region 1).

[0221] In this embodiment of the present application, if the image type is a differential image, the differential image carried in the response message needs to be restored to a refined image; the reference image ID in the response message indicates the image ID of region 1 of the image to be processed. If the image type is a non-differential image, it indicates that the response message carries the refined image and no differential restoration is required; the image ID in the response message indicates the image ID of region 1 of the image to be processed.

[0222] Similarly, when the image type is a differential image, the response message may also carry a differential algorithm identifier, and the terminal device 100 performs differential restoration according to the restoration algorithm corresponding to the differential algorithm indicated by the differential algorithm identifier.

[0223] S121. The terminal device 100 determines whether the image to be processed corresponding to the area diagram 1 adopts the subject refinement mode; if not, execute S122; if so, execute S123.

[0224] As can be seen from the description of steps S119 and S120, the response message indicates the image ID of region 1. The terminal device 100 can query the refinement mode of the image to be processed based on the image ID of region 1. It can be understood that in full-image refinement mode, the image ID of region 1 is the image ID of the image to be processed; in subject refinement mode, the image ID of region 1 is the image ID of the target subject image of the image to be processed.

[0225] In some embodiments, in the subject refinement mode, the terminal device 100 records the correspondence between the image ID of the image to be processed and the image ID of the target subject image; in step S121, based on the correspondence, the image to be processed and the refinement mode of the image to be processed can be queried. In some embodiments, the terminal device 100 records the image ID of the region map of the image to be processed in the subject refinement mode in file 1. If file 1 includes the image ID of region map 1, the refinement mode of the image to be processed corresponding to region map 1 is subject refinement. In one implementation, the terminal device 100 records the image ID of the image to be processed in the full image refinement mode in file 2. If file 2 does not include the image ID of region map 1, the refinement mode of the image to be processed corresponding to region map 1 is subject refinement.

[0226] S122: The terminal device 100 determines that the refined image of the region image 1 is the refined image of the image to be processed.

[0227] S123 . The terminal device 100 obtains a refined image of the image to be processed according to the position of the region image 1 in the image to be processed and the refined image of the region image 1 .

[0228] In the subject refinement mode, according to the position of the area map 1 (i.e., the target subject map) in the image to be processed, the terminal device 100 replaces the target subject map in the image to be processed with the refined map of the target subject map to obtain the refined map of the image to be processed.

[0229] It can be understood that in the subject refinement mode, the region image 1 of the image to be processed is the target subject image after cutting, and the refined image of the region image 1 and the image to be processed need to be spliced ​​to obtain the refined image of the image to be processed.

[0230] S124. The terminal device 100 displays the refined image of the image to be processed.

[0231] For example, referring to the relevant descriptions of the aforementioned application scenarios one to five, after the terminal device 100 obtains the refined image of the cloud-based collaborative refinement, the terminal device 100 can display the refined image for the user to view.

[0232] In conjunction with the above embodiments, Figure 8 shows a device architecture diagram provided by an embodiment of the present application. As shown in Figure 8, the terminal device 100 may include an acquisition module, a cropping module, a continuous shot recognition module, an end-side difference module, and a display module. The server 200 may include a cloud-side difference module and a refinement module.

[0233] The acquisition module on the terminal side is used to acquire the image to be processed, for example, the image a, image b or image c mentioned above.

[0234] The client-side cutting module is used to cut out the target main image from the image to be processed in the main refinement mode and determine that Region 1 of the image to be processed is the target main image. For the image to be processed in the full image refinement mode, Region 1 of the image to be processed is determined to be the image to be processed itself.

[0235] The continuous shooting recognition module on the end side is used to identify whether the current image to be processed is not the first image in the continuous shooting scene. If it is not the first image in the continuous shooting scene (such as the aforementioned image a), it triggers the device to send region map 1 of the image to be processed to server 200. If it is the first image in the continuous shooting scene (such as the aforementioned image b), it instructs the end side difference module to obtain the difference image of region map 1.

[0236] The terminal-side difference module is used to obtain a difference image 1 between the region map of a non-first image (such as the aforementioned image b) in a continuous shooting scenario and a reference image (such as the region map of the aforementioned image c), and trigger the terminal device 100 to upload the difference image 1 and the reference image ID to the server 200. The reference image has already been uploaded to the cloud, or is uploaded to the cloud simultaneously with the difference image 1.

[0237] The cloud-side difference module is used to restore the region map 1 of the image to be processed based on the received difference image 1 and the reference image ID.

[0238] The cloud-based refinement module is used to refine the region image 1 of the image to be processed and obtain a refined image of the region image 1.

[0239] The cloud-based differential module is also used to obtain the differential image 2 before and after the refinement of the above-mentioned regional image 1, triggering this device to send the differential image 2 and the reference image ID (i.e., the image ID of the regional image 1 of the image to be processed) to the terminal device 100.

[0240] The difference module on the terminal side is further used to restore the refined image of the region image 1 of the image to be processed based on the difference image 2 and the region image 1 of the image to be processed.

[0241] The terminal-side cutting module is also used to replace Region 1 in the image to be processed in the main refinement mode with the refined image of Region 1, thereby obtaining a refined image of the image to be processed. It can be understood that for the image to be processed in the full image refinement mode, the refined image of Region 1 is the refined image of the image to be processed.

[0242] The display module on the terminal side is used to display the refined image of the image to be processed.

[0243] The embodiment of the present application does not specifically limit the implementation of the image ID. For example, the image IDs of the images to be processed are numbered 1, 2, 3, etc. The image with image ID x can be simply referred to as image x.

[0244] The following examples illustrate the image processing flow for the full image refinement mode and the main body refinement mode respectively.

[0245] For example, Figure 9A illustrates an image processing flow for an image to be processed in full image refinement mode, and Figure 9B illustrates a schematic diagram of each image involved in the processing flow. The processing flow includes steps A1 to A24. For the specific implementation of each step, please refer to the description of the corresponding step in Figure 7A.

[0246] The images to be processed include image 1 and image 4; image 1 is not the first image in the continuous shooting scene; image 4 is the first image in the continuous shooting scene. Image 1 and image 4 can be images in any of the aforementioned application scenarios.

[0247] A1. The acquisition module of the terminal device 100 acquires the image 1 to be processed.

[0248] Exemplarily, image 1 is the first photo taken by the camera APP of the terminal device 100 using the full-image refinement mode. FIG9B shows a schematic diagram of image 1.

[0249] In one embodiment, the acquisition module may also acquire image parameters of image 1, including part or all of the image name, refinement mode, file time (e.g., shooting time), image ID, and retouching parameters. Optionally, if image 1 is a photo taken with a continuous shooting function, the image parameters may also include a continuous shooting identifier, which may indicate that image 1 is a photo taken with a continuous shooting function and whether it is the first photo of the continuous shooting. Optionally, the continuous shooting identifier may be an independent identifier or may be carried in the image name or image ID. Exemplarily, the image name of a continuous shooting photo includes a continuous shooting identifier and a continuous shooting number, the continuous shooting identifier is "Burst", and the continuous shooting number is used to indicate which photo of the continuous shooting the photo is; for example, the image name of the first photo of the continuous shooting includes Burst01, and the image name of the third photo of the continuous shooting includes Burst03.

[0250] A2. The cutting module of the terminal device 100 determines that the target main image of the image 1 does not need to be cut according to the full image refinement mode adopted by the image 1, and the regional image within the refined area of ​​the image 1 is the image 1 itself.

[0251] Exemplarily, referring to the description related to FIG. 3C to FIG. 3L , image 1 is a photo taken by the terminal device 100 using a landscape filter, and the refinement mode corresponding to the landscape filter is full-image refinement.

[0252] A3. The continuous shooting recognition module of the terminal device 100 determines that Image 1 is not the non-first image of the continuous shooting scene.

[0253] Exemplarily, since Image 1 is the first photo taken by the continuous shooting function, the terminal device 100 determines that Image 1 is not a non-first image in the continuous shooting scenario.

[0254] A4. The end-side difference module determines that it is not necessary to perform difference on Image 1 and records Image 1 and the image ID of Image 1.

[0255] The embodiment of the present application does not specifically limit the implementation of interaction between modules within the terminal device 100.

[0256] In one embodiment, the acquisition module sends image 1, image 1's image ID, and image 1's refinement mode to the cropping module, invoking the cropping module to execute step A2. The acquisition module sends image 1, image 1's image ID, and image 1's continuous shooting identifier to the continuous shooting recognition module, invoking the continuous shooting recognition module to execute step A3. The acquisition module sends the execution results of steps A2 and A3, as well as image 1 and image 1's image ID, to the end-side differencing module, invoking the end-side differencing module to execute step A4. The execution order of steps A2 and A3 is not specifically limited herein.

[0257] In one embodiment, the acquisition module sends image 1 and image parameters of image 1 to the cutting module, and calls the cutting module to execute step A2; when there is no need to cut image 1, the cutting module sends image 1 and image parameters of image 1 to the continuous shooting recognition module, and calls the continuous shooting recognition module to execute step A3; the continuous shooting recognition module sends image 1, image ID of image 1 and the execution result of step A3 to the end-side differential module, and calls the end-side differential module to execute step A4.

[0258] A5. The end-side differential module triggers the terminal device 100 to send a request message 1 to the server 200. The request message 1 includes image 1, the image ID of image 1, the image type of image 1, and the retouching parameters. The image type indicates that image 1 is a non-differential image.

[0259] It can be understood that Image 1 adopts the full-image refinement mode, and Image 1 is not the first image of the continuous shooting scene; therefore, the terminal device 100 does not need to perform differential on Image 1 and directly uploads the complete image of Image 1 to the server 200.

[0260] Optionally, the request message 1 may also include an image name. For example, the image name, image type, and image ID carried in the request message 1 are as follows: { "imageName":"Image 1", / / Image name "imagetype":"srcImage", / / Image type, srcImage indicates a non-differential image "imageId":"1" / / Image ID}

[0261] A6. Based on the non-differential image indicated by the image type in the request message 1, the cloud-side differential module determines that it is not necessary to perform differential restoration on the image 1, and records the image 1 and the image ID of the image 1.

[0262] A7. The retouching module of the server 200 obtains a retouched image of the image 1 (ie, image 2).

[0263] The retouching module of server 200 retouches image 1 according to the image processing algorithm indicated by the retouching parameters in request message 1, and obtains a retouched image 2. The retouching module of server 200 sends image 2 to the cloud-based difference module. For example, FIG9B shows a schematic diagram of a retouched image 2.

[0264] A8. The cloud-based difference module obtains the refined image of Image 1 (i.e., Image 2) and the difference image between Image 1 (i.e., Image 3), where Image 1 is the reference image of the difference image.

[0265] Exemplarily, FIG9B shows a schematic diagram of an image 3, where image 3 = image 2 - image 1.

[0266] A9. The cloud-based differential module triggers the server 200 to send a response message 1 to the terminal device 100. The response message 1 includes image 3, the image ID of image 3, the reference image ID, the image type and the differential algorithm identifier. The image type indicates that image 3 is a differential image.

[0267] In some embodiments, when the cloud-side difference module determines that the differential image (ie, image 3) has a smaller data size than the refined image (ie, image 2), the differential image is transmitted back to the terminal device 100 via a response message 1.

[0268] For example, the image name, image type, differential algorithm identifier, image ID, and reference image ID carried in the response message 1 are as follows:

[0269] A10. The end-side difference module determines that differential restoration is required based on the differential image indicated by the image type in response message 1, and restores image 2 based on image 3, image 1 indicated by the reference image ID, and the restoration algorithm indicated by the differential algorithm identifier.

[0270] Exemplarily, as shown in FIG9B , image 2 (ie, the refined image of image 1 ) = image 3 (ie, the differential image) + image 1 .

[0271] A11. When it is determined that the image 1 indicated by the reference image ID in the response message 1 is not the target main image, the cutting module of the terminal device 100 determines that the image 2 is a refined image of the image 1.

[0272] In some embodiments, the cutting module of the terminal device 100 records the image ID of the cut target subject image; if the cutting module determines that the recorded image ID of the target subject image does not include the reference image ID (i.e., the image ID of image 1), it is determined that image 1 is not the target subject image, but a complete image to be processed.

[0273] In some embodiments, the terminal device 100 records the image ID and refinement mode of the image to be processed; if the cutting module queries that the image ID of the image to be processed includes the reference image ID (i.e., the image ID of image 1), it is determined that image 1 is not the target subject image, but a complete image to be processed.

[0274] A12. The display module of the terminal device 100 displays the refined image of image 1 (ie, image 2).

[0275] The embodiment of the present application does not impose any specific limitation on the time for the terminal device 100 to display the image 1 .

[0276] A13. The acquisition module of the terminal device 100 acquires the image 4 to be processed.

[0277] Exemplarily, image 4 is the second photo taken by the camera APP of the terminal device 100 using the full-image refinement mode. FIG9B shows a schematic diagram of image 4.

[0278] In one embodiment, the acquisition module may also acquire image parameters of image 4, including some or all of the image name, retouching mode, retouching parameters, image ID, continuous shooting identifier, and retouching parameters. For details, please refer to the relevant description of image 1.

[0279] A14. The cutting module of the terminal device 100 determines that there is no need to cut the image 4 according to the full image refinement mode adopted by the image 4, and the regional image within the refined area of ​​the image 4 is the image 4 itself.

[0280] A15. The continuous shooting recognition module of the terminal device 100 determines that image 4 is not the first image of the continuous shooting scene.

[0281] Exemplarily, referring to Figures 3C to 3L, Image 4 is the second photo b taken using the continuous shooting function, and the terminal device 100 determines that Image 4 is not a non-first image in the continuous shooting scenario. Exemplarily, Image 4 is a photo taken without the continuous shooting function, and the terminal device 100 determines that the shooting time interval between the photo and the previous photo (i.e., Image 1) is less than a time threshold, or that the similarity between the photo and the previous photo is greater than a similarity threshold; therefore, Image 4 is determined to be a non-first image in the continuous shooting scenario.

[0282] A16. The end-side difference module obtains a difference image (ie, image 5) between image 4 and image 1, where image 1 is the reference image of the difference image.

[0283] The terminal device 100 selects a reference image for difference for image 4, for example, the reference image is the previous photo (ie, image 1). FIG9B shows a schematic diagram of a difference image (ie, image 5) between image 4 and image 1, where image 5 = image 4 - image 1.

[0284] A17. The end-side differential module triggers the terminal device 100 to send a request message 2 to the server 200, including image 5, the image ID of image 5, the reference image ID, the source image ID, the image type and the differential algorithm identifier. The image type indicates that image 5 is a differential image.

[0285] In some embodiments, request message 1 of step A5 and request message 2 of step A17 can also be uploaded to server 200 at the same time, that is, image 1 (i.e., the first photo) and image 5 (i.e., the differential image between the second photo and the first photo) can be uploaded to server 200 at the same time.

[0286] For example, the image name, image type, differential algorithm identifier, image ID, reference image ID, and source image ID (i.e., the image ID of image 4) carried in request message 2 are as follows:

[0287] A18. The cloud-based differential module determines that differential restoration is required based on the differential image indicated by the image type in request message 2. It restores image 4 based on image 5, image 1 indicated by the reference image ID, and the restoration algorithm indicated by the differential algorithm identifier, and records image 4 and the image ID of image 4. The image ID of image 4 is the above-mentioned source image ID.

[0288] A19. The retouching module of the server 200 obtains the retouched image of the image 4 (ie, the image 6).

[0289] The refinement module of the server 200 sends the image 6 to the cloud-based difference module.

[0290] The present embodiment does not specifically limit the order in which steps A7 and A19 are executed. In some embodiments, steps A7 and A19 can be executed simultaneously, i.e., image 1 and image 4 can be refined simultaneously. In one implementation, the refinement module is provided with multiple containers for refinement. The terminal device 100 assigns image 1 and image 4 to different containers for refinement. The refinement task execution modules in the two containers refine the two images in parallel.

[0291] A20. The cloud-based differential module obtains the refined image of image 4 (i.e., image 6) and the differential image of image 4 (i.e., image 7).

[0292] For example, FIG9B shows a schematic diagram of a differential image (ie, image 7 ) of image 4 before and after refinement, where image 7 = image 6 − image 4 .

[0293] A21. The cloud-based differential module triggers the server 200 to send a response message 2 to the terminal device 100, including image 7, the image ID of image 7, the reference image ID, the image type and the differential algorithm identifier. The image type indicates that image 7 is a differential image.

[0294] In some embodiments, when the cloud-side difference module determines that the differential image (ie, image 7) has a smaller data size than the refined image (ie, image 6), the differential image is transmitted back to the terminal device 100 via response message 2.

[0295] For example, the image name, image type, differential algorithm identifier, image ID, and reference image ID carried in response message 2 are as follows:

[0296] A22. The end-side difference module determines that differential restoration is required based on the differential image indicated by the image type in the response message 1, and restores the image 6 based on the image 7, the image 4 indicated by the reference image ID, and the restoration algorithm indicated by the differential algorithm identifier.

[0297] Exemplarily, as shown in FIG9B , image 6 (ie, the refined image of image 4 ) = image 7 (ie, the differential image) + image 4 .

[0298] A23. When it is determined that image 4 indicated by the reference image ID in response message 2 is not the target main image, the cutting module of terminal device 100 determines that image 6 is a refined image of image 4.

[0299] For details, please refer to the relevant description of step A11, which will not be repeated here.

[0300] A24. The display module of the terminal device 100 displays the refined image of image 4 (ie, image 6).

[0301] This method identifies the user's continuous shooting scenes and uploads and returns photo data in a differential manner, which greatly reduces the amount of data transmitted in the network and minimizes the overall time consumption.

[0302] Exemplarily, after step A24, the acquisition module on the end side also obtains the third photo taken by the camera APP in the full-image retouching mode. The cutting module on the end side determines that there is no need to cut the target subject based on the full-image retouching mode used for the photo. After the continuous shooting recognition module on the end side recognizes that the photo is not the first image in the continuous shooting scene, the differential module on the end side obtains the differential image corresponding to the third photo, and triggers the device to send the differential image to the server 200. The differential image can be the differential image between the third photo and the second photo, or the differential image between the third photo and the first photo, that is, the reference image of the differential image can be the second photo or the first photo. Since the cloud-side differential module has obtained the first photo and the second photo, the third photo can be restored based on the above-mentioned differential image and the reference image. The subsequent cloud-side refinement and end-side return processing of the third photo can refer to the relevant description of the second photo (i.e., image 4) in Figures 9A and 9B, which will not be repeated here.

[0303] For example, FIG10A illustrates an image processing flow for an image to be processed in the subject refinement mode, and FIG10B illustrates a schematic diagram of each image involved in the processing flow. The processing flow includes steps A1 to A24. For the specific implementation of each step, please refer to the description of the corresponding step in FIG7A.

[0304] The images to be processed include image 11 and image 16. Image 11 is not the first image in the continuous shooting scene; image 16 is the first image in the continuous shooting scene. Images 11 and 16 can be images in any of the aforementioned application scenarios.

[0305] B1. The acquisition module of the terminal device 100 acquires the image 11 to be processed.

[0306] Exemplarily, image 11 is the first photo taken by the camera APP of the terminal device 100 using the subject refinement mode. FIG10B shows a schematic diagram of image 11.

[0307] In one embodiment, the acquisition module may further acquire image parameters of image 11, including some or all of the image name, retouching mode, file time (e.g., shooting time), retouching parameters, image ID, continuous shooting indicator, and retouching parameters. The image parameters of image 11 can be found in the description of image 1 and are not further described here.

[0308] B2. The cutting module of the terminal device 100 determines to cut the target subject image (ie, image 12) from the image 11 according to the subject refinement mode adopted by the image 11; and records the position of the image 12 in the image 11.

[0309] 4A to 4F , image 11 is the first photo taken by the terminal device 100 in portrait mode, and the subject is refined in the refinement mode corresponding to the portrait mode. FIG10B exemplarily shows a schematic diagram of cutting out the target subject image (i.e., image 12) from image 11.

[0310] The cutting module of the terminal device 100 records the image parameters of the target main image (i.e., image 12), including the image ID of the target main image, the image ID of the corresponding full image (i.e., image 11), and the position in image 11 (i.e., the coordinates of the upper left corner, width, and height). For example, the image parameters 2 of image 12 are as follows:

[0311] B3. The continuous shooting recognition module of the terminal device 100 determines that the image 11 is not the non-first image of the continuous shooting scene.

[0312] Exemplarily, image 11 is the first photo taken by the continuous shooting function, and the terminal device 100 determines that image 11 is not a non-first image in the continuous shooting scenario.

[0313] B4. The terminal-side difference module determines that there is no need to perform difference on the target subject image of image 11 (ie, image 12 ), and records image 12 and the image ID of image 12 .

[0314] B5. The end-side differential module triggers the terminal device 100 to send a request message 3 to the server 200, including the image 12, the image ID, and the image type. The image type indicates that the image 12 is a non-differential image.

[0315] The embodiment of the present application does not specifically limit the implementation of the interaction between modules in the terminal device 100. For details, please refer to the relevant description of step A5, which will not be repeated here.

[0316] It can be understood that image 11 adopts the subject refinement mode, and image 11 is not the first image of the continuous shooting scene; therefore, the terminal device 100 does not need to differentiate the target subject image of image 11, and directly uploads the complete image of the target subject image of image 11 to the server 200.

[0317] Optionally, the request message 3 may also include the image name of the target subject image. For example, the image name, image type, and image ID carried in the request message 3 are as follows:

[0318] B6. Based on the non-differential image indicated by the image type in the request message 3, the cloud-side differential module determines that differential restoration is not required and records the image 12 and the image ID of the image 12.

[0319] B7. The retouching module of the server 200 obtains a retouched image of the image 12 (ie, image 13).

[0320] The retouching module of server 200 retouches image 12 according to the image processing algorithm indicated by the retouching parameters in request message 3, obtaining a retouched image 13. The retouching module of server 200 sends image 13 to the cloud-based difference module. For example, FIG10B shows a schematic diagram of a retouched image 13.

[0321] B8. The cloud-based difference module obtains the refined image of image 12 (ie, image 13) and the difference image of image 12 (ie, image 14), where image 12 is the reference image of the difference image.

[0322] Exemplarily, FIG10B shows a schematic diagram of a differential image (ie, image 14 ) of image 11 before and after refinement, where image 14 = image 13 − image 12 .

[0323] B9. The cloud-side differential module triggers the server 200 to send a response message 3 to the terminal device 100. The response message 3 includes the image 14, the image ID of the image 14, the reference image ID, the image type and the differential algorithm identifier. The image type indicates that the image 14 is a differential image.

[0324] In some embodiments, when the cloud-side difference module determines that the differential image (ie, image 14) has a smaller data size than the refined image (ie, image 13), the differential image is transmitted back to the terminal device 100 via response message 3.

[0325] For example, the image name, image type, differential algorithm identifier, image ID, and reference image ID carried in response message 3 are as follows:

[0326] B10. The end-side difference module determines that differential restoration is required based on the differential image indicated by the image type in the response message 1, and restores the image 13 based on the image 14, the image 12 indicated by the reference image ID, and the restoration algorithm indicated by the differential algorithm identifier.

[0327] Exemplarily, as shown in FIG10B , image 13 (ie, the refined image of image 12 ) = image 14 (ie, the differential image) + image 12 .

[0328] B11. The cutting module of the terminal device 100 determines that the image 12 indicated by the reference image ID is the target main image, uses the image 13 to replace the image 12 in the image 11 to obtain the image 15, and determines that the image 15 is the refined image of the image 11.

[0329] Specifically, for the specific implementation of step B11, reference may be made to the relevant description of step A11, which will not be repeated here.

[0330] B12. The display module of the terminal device 100 displays the refined image 11 (ie, image 15).

[0331] The embodiment of the present application does not impose any specific limitation on the time for the terminal device 100 to display the image 1 .

[0332] B13. The acquisition module of the terminal device 100 acquires the image 16 to be processed.

[0333] Exemplarily, image 16 is a second photo taken by the camera APP of the terminal device 100 using the subject refinement mode. FIG10B shows a schematic diagram of image 16.

[0334] In one embodiment, the acquisition module may also acquire image parameters of the image 16, including some or all of the image name, retouching mode, file time, image ID, continuous shooting flag, and retouching parameters. For details, please refer to the description of the image 1.

[0335] B14. The cutting module of the terminal device 100 cuts the target subject image (ie, image 17) from the image 16 according to the subject refinement mode adopted by the image 16; and records the position of the image 17 in the image 16.

[0336] 10B exemplarily shows a schematic diagram of cutting out a target subject image (ie, image 17 ) from image 16 .

[0337] The cutting module of the terminal device 100 records the image parameters of the target main image, including the image ID of the target main image (i.e., image 17), the image ID of the corresponding full image (i.e., image 16), and the position in image 16 (i.e., the coordinates of the upper left corner, width, and height). For example, the image parameters of image 17 are as follows:

[0338] B15. The continuous shooting recognition module of the terminal device 100 determines that image 16 is not the first image of the continuous shooting scene.

[0339] Exemplarily, image 16 is the second photo taken with the continuous shooting function, and the terminal device 100 determines that image 16 is not a non-first image in the continuous shooting scenario. Exemplarily, referring to Figures 4A to 4F, image 16 is a photo taken without the continuous shooting function, and the terminal device 100 determines that the shooting time interval between the photo and the previous photo (i.e., image 11) is less than a time threshold, or that the similarity between the target subject image of the photo and the target subject image of the previous photo is greater than a similarity threshold; therefore, image 16 is determined to be a non-first image in the continuous shooting scenario.

[0340] B16 . The end-side difference module obtains a difference image (ie, image 18 ) between image 17 and image 12 .

[0341] In subject refinement mode, the terminal device 100 selects a reference image for subtraction of the target subject image of image 16 (i.e., image 17). For example, the reference image is the target subject image of the previous photo (i.e., image 12). Figure 10B shows a schematic diagram of a subtraction image (i.e., image 18) between image 17 and image 12, where image 18 = image 17 - image 12.

[0342] B17. The end-side difference module triggers the terminal device 100 to send a request message 4 to the server 200, including the image 18, the image ID of the image 18, the reference image ID, the source image ID, the image type and the difference algorithm identifier, where the image type indicates a difference image.

[0343] In some embodiments, when the cloud-based difference module determines that the differential image (ie, image 18 ) has a smaller data size than the original image (ie, image 17 ), the differential image is uploaded to the server 200 via a request message 4 .

[0344] In some embodiments, the request message 2 of step B5 and the request message 4 of step B17 can also be uploaded to the server 200 at the same time, that is, image 12 (that is, the target subject image of the first photo) and image 18 (that is, the differential image between the target subject image of the second photo and the target subject image of the first photo) can be uploaded to the server 200 at the same time.

[0345] For example, the image name, image type, differential algorithm identifier, image ID, reference image ID, and source image ID carried in the request message 4 are as follows:

[0346] B18. The end-side difference module determines that differential restoration is required based on the differential image indicated by the image type in request message 4. It restores image 17 based on image 18, image 12 indicated by the reference image ID, and the differential algorithm identifier, and records image 17 and the image ID of image 17. The image ID of image 17 is the aforementioned source image ID.

[0347] B19. The refinement module of the server 200 obtains a refined image of the image 17 (ie, image 19).

[0348] The retouching module of server 200 retouches image 17 according to the image processing algorithm indicated by the retouching parameters in request message 4, obtaining a retouched image 19. The retouching module of server 200 sends image 19 to the cloud-based difference module. For example, FIG10B shows a schematic diagram of a retouched image 19.

[0349] The embodiment of the present application does not specifically limit the execution order of step B7 and step B19. In some embodiments, step B7 and step B19 can be executed simultaneously, that is, image 12 and image 17 are refined at the same time.

[0350] B20. The cloud-based difference module obtains the refined image of image 17 (ie, image 19) and the difference image between image 17 (ie, image 20), where image 17 is the reference image of the difference image.

[0351] Exemplarily, FIG10B shows a schematic diagram of a differential image (ie, image 20 ) of image 17 before and after refinement, where image 20 = image 19 − image 17 .

[0352] B21. The end difference module triggers the server 200 to send a response message 4 to the terminal device 100, including the image 20, the image ID of the image 20, the reference image ID, the image type and the difference algorithm identifier. The image type indicates that the image 20 is a difference image.

[0353] In some embodiments, the cloud-side difference module transmits the difference image back to the terminal device 100 via response message 4 only when it determines that the difference image (i.e., image 20) has a smaller data size than the refined image (i.e., image 19).

[0354] For example, the image name, image type, differential algorithm identifier, image ID, and reference image ID carried in response message 4 are as follows:

[0355] B22. The end-side difference module determines that differential restoration is required based on the differential image indicated by the image type in the response message 1, and restores image 19 based on image 20, image 17 indicated by the reference image ID, and the restoration algorithm indicated by the differential algorithm identifier.

[0356] B23. The cutting module of the terminal device 100 determines that the image 17 indicated by the reference image ID is the target main image, uses image 19 to replace image 17 in image 16 to obtain image 21, and determines that image 21 is a refined image of image 16.

[0357] B24. The display module of the terminal device 100 displays the refined image 16 (ie, image 21).

[0358] The embodiment of the present application does not impose any specific limitation on the time for the terminal device 100 to display the image 16 .

[0359] Exemplarily, after step B24, the acquisition module on the end side also acquires the third photo taken by the camera APP in the subject refinement mode. The cutting module on the end side determines the target subject image for cutting the third photo based on the subject refinement mode adopted by the photo. After the continuous shooting recognition module on the end side recognizes that the photo is not the first image in the continuous shooting scene, the differential module on the end side acquires the differential image corresponding to the target subject image of the third photo, and triggers the device to send the differential image to the server 200. The differential image can be the differential image between the target subject image of the third photo and the target subject image of the second photo, or the differential image between the target subject image of the first photo, that is, the reference image of the differential image is the target subject image of the second photo or the target subject image of the first photo. Since the cloud-side differential module has acquired the target subject image of the first photo and the target subject image of the second photo, the target subject image of the third photo can be restored based on the above differential image and the reference image. The subsequent cloud-based refinement and end-side backhaul processing of the third photo can be referred to the relevant description of the second photo (i.e., image 16) in Figures 10A and 10B, and will not be repeated here.

[0360] In combination with the foregoing embodiments, an embodiment of the present application provides an end-cloud collaborative image processing method, which includes steps S201 to S208.

[0361] S201: The electronic device obtains a first image to be processed.

[0362] S202. The electronic device sends a first area map of the first image to the server through a first request message; the first area map includes images within a partial or entire area of ​​the first image.

[0363] S203: The electronic device obtains a second image to be processed, where the second region map includes images within a partial or entire region of the second image.

[0364] S204: The electronic device sends a first differential image to the server through a second request message, where the first differential image is a differential image between the second region image of the second image and the first region image of the first image.

[0365] S205: The server restores the second region map according to the first differential image and the first region map.

[0366] S206: The server performs image processing on the second region image to obtain a refined image of the second region image.

[0367] S207. The server sends a second response message to the electronic device, where the second response message is used to indicate a refined image of the second area image.

[0368] S208: The electronic device determines a refined image of the second image based on the refined image of the second region image.

[0369] In the embodiments of the present application, the image to be processed in the aforementioned embodiments may be the first image, the second image, or the third image. The first image may also be image a in the aforementioned embodiments, which is not the first image in a continuous shooting scenario; the second image / third image may be image b in the aforementioned embodiments, which is a non-first image in a continuous shooting scenario.

[0370] In one implementation, the second response message includes a second differential image, which is a differential image between a refined image of the second region image and the second region image; the method also includes: the electronic device restoring the refined image of the second region image based on the second differential image and the second region image.

[0371] Exemplarily, referring to the relevant description of FIG7A , when the image to be processed is the second image, the second region map may be the aforementioned region map 1 , the first difference image may be the aforementioned difference image 1 ; and the second difference image may be the aforementioned difference image 2 .

[0372] In one implementation, the method further includes: the server performing image processing on the first area image to obtain a refined image of the first area image; the server sending a first response message to the electronic device, the first response message being used to indicate the refined image of the first area image; and the electronic device determining the refined image of the first image based on the refined image of the first area image.

[0373] For example, referring to the embodiment described in FIG9A and FIG9B , in the full image refinement mode, the first image and the first region of the first image may be the aforementioned Image 1; the first request message may be the aforementioned Request Message 1, and the first response message may be the aforementioned Response Message 1. The second image and the second region of the second image may be the aforementioned Image 4, and the first difference image may be the aforementioned Image 5; the second request message may be the aforementioned Request Message 2, and the second response message may be the aforementioned Response Message 2.

[0374] For example, referring to the embodiment described in FIG. 10A and FIG. 10B , in the subject refinement mode, the first image may be the aforementioned image 11, the first region map of the first image may be the aforementioned image 12, the first request message may be the aforementioned request message 3, and the first response message may be the aforementioned response message 3. The second image may be the aforementioned image 16, the second region map of the second image may be the aforementioned image 17, and the first difference image may be the aforementioned image 18. The second request message may be the aforementioned request message 4, and the second response message may be the aforementioned response message 4.

[0375] In one implementation, the electronic device is provided with a continuous shooting function, and the first image and the second image are two images taken in one continuous shooting function; the method further includes: the electronic device detects a first input operation to start the continuous shooting function; the above-mentioned electronic device obtains the first image to be processed, and the electronic device obtains the second image to be processed, including: in response to the first input operation, the electronic device obtains the first image and the second image of the continuous shooting; the first image is the first image of the continuous shooting, and the second image is a non-first image of the continuous shooting.

[0376] For example, referring to the related description of application scenario 1, as shown in FIG. 3E to FIG. 3I , the first input operation may include a long press operation on the shooting control 105 .

[0377] In one implementation, the electronic device acquires a first image to be processed, including: in response to a detected first capture instruction, the electronic device's camera captures the first image; the electronic device acquires a second image to be processed, including: in response to a detected second capture instruction, the electronic device's camera captures the second image; the time interval between the capture of the second image and the first image is less than a time threshold, and / or the similarity between the second image and the first image is greater than a similarity threshold. Exemplarily, the time threshold is 0.5 seconds, and the similarity threshold is 80%.

[0378] For example, referring to the description of the second application scenario, as shown in FIG. 4B and FIG. 4C , the first shooting instruction and the second shooting instruction may both include a click operation acting on the shooting control 105 .

[0379] In one implementation, the method also includes: the electronic device obtains a third image to be processed; the electronic device sends a third differential image to the server through a third request message, where the third differential image is a differential image between a third area image of the third image and a first area image of the first image; the third area image includes images within part or all of the area of ​​the third image; the server restores the third area image based on the third differential image and the first area image; the server performs image processing on the third area image to obtain a refined image of the third area image; the server sends a third response message to the electronic device, where the third response message is used to indicate the refined image of the third area image; the electronic device determines the refined image of the third image based on the refined image of the third area image.

[0380] Exemplarily, referring to the relevant description of FIG2B , the first image may be the first photo taken, the second image may be the second photo taken, and the third image may be the nth photo taken (eg, the third photo).

[0381] In one implementation, the method also includes: the electronic device obtains a third image to be processed; the electronic device sends a third differential image to the server through a third request message, where the third differential image is a differential image between a third area image of the third image and a second area image of the second image; the third area image includes images within part or all of the area of ​​the third image; the server restores the third area image based on the third differential image and the second area image; the server performs image processing on the third area image to obtain a refined image of the third area image; the server sends a third response message to the electronic device, where the third response message is used to indicate the refined image of the third area image; the electronic device determines the refined image of the third image based on the refined image of the third area image.

[0382] Exemplarily, referring to the related description of FIG2C , the first image may be the first photo taken, the second image may be the second photo taken, and the third image may be the third photo taken.

[0383] In one implementation, for the third image to be processed, the terminal side may upload to the cloud a differential image between the third image and any image that has been uploaded to the cloud.

[0384] In one implementation, the electronic device sends the first differential image to the server via a second request message, including: when the data volume of the first differential image is smaller than the data volume of the second area map, the electronic device sends the first differential image and the image ID of the first area map to the server via the first request message; when the data volume of the second differential image is smaller than the data volume of the refined image of the second area map, the second response message includes the second differential image and the image ID of the second area map, and the second differential image is a differential image between the refined image of the second area map and the second area map; when the data volume of the second differential image is smaller than the data volume of the refined image of the second area map, the second response message includes the refined image of the second area map.

[0385] In one implementation, when the image refinement mode is full-image refinement mode, the region map of the image includes the image content within the entire region of the image; when the second image refinement mode is full-image refinement mode, the second image and the second region map are identical, and the refined image of the second region map is the refined image of the second image. For example, referring to the embodiment described in Figures 9A and 9B, in full-image refinement mode, the first image and the first region map of the first image are both Image 1; and the second image and the second region map of the second image are both Image 4.

[0386] In one implementation, when the image refinement mode is the subject refinement mode, the region map of the image includes the target subject in the image, and the size of the region map of the image is smaller than the size of the image; when the second image refinement mode is the subject refinement mode, before the electronic device sends the first differential image to the server via the second request message, the method further includes: the electronic device obtains the position of the second region map in the second image and crops the second region map from the second image; the electronic device determines the refined image of the second image based on the refined image of the second region map, including: based on the position of the second region map in the second image, the electronic device replaces the second region map in the second image with the refined image of the second region map to obtain the refined image of the second image. For example, referring to the embodiment described in Figures 10A and 10B, in the subject refinement mode, the first image can be the aforementioned image 11, the first region map of the first image can be the aforementioned image 12, and the refined image of the first region map can be the aforementioned image 13. By replacing image 12 in image 11 with image 13, the refined image of image 11 can be obtained.

[0387] In one implementation, the first request message includes a first photo retouching parameter, which is used to indicate at least one image processing method adopted for the second image; the above-mentioned server performs image processing on the second area image of the second image to obtain a refined image of the second area image, including: the server performs image processing on the second image according to at least one image processing method indicated by the first photo retouching parameter to obtain a refined image of the second area image.

[0388] In one implementation, the electronic device pre-stores a correspondence between multiple image processing methods and refinement modes, and the refinement modes include a full-image refinement mode and a subject refinement mode; the above-mentioned multiple image processing methods include multiple shooting modes, and the above-mentioned multiple shooting modes include a portrait mode, and the refinement mode corresponding to the portrait mode is the subject refinement mode; the image processing method adopted by the image is used to determine the refinement mode of the image.

[0389] In one implementation, the first request message also includes the image ID of the first area map; the second request message also includes the reference image ID and the source image ID of the first differential image, the reference image of the first differential image is the first area map, and the source image of the first differential image is the second area map; the above-mentioned server restores the second area map based on the first differential image and the first area map, including: the server restores the second area map based on the first differential image and the first area map indicated by the reference image ID, and determines that the image ID of the restored second area map is the source image ID; the second response message includes the image ID of the second area map.

[0390] In one implementation, the second request message further includes an algorithm identifier, the algorithm identifier indicating the first restoration algorithm; and the server restoring the second region map based on the first differential image and the first region map includes: the server restoring the second region map based on the first differential image, the first region map, and the first restoration algorithm. The algorithm identifier may be the aforementioned differential algorithm identifier.

[0391] The following describes the structure of a terminal device 100 provided in an embodiment of the present application. FIG11 shows a schematic diagram of the structure of the terminal device 100.

[0392] The terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0393] It should be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0394] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.

[0395] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0396] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.

[0397] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.

[0398] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C bus lines. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, and the like via different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K via the I2C interface, enabling communication between the processor 110 and the touch sensor 180K via the I2C bus interface, thereby implementing the touch function of the terminal device 100.

[0399] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface, enabling the function of answering calls through a Bluetooth headset.

[0400] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0401] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface, enabling the function of playing music through Bluetooth headphones.

[0402] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the camera function of the terminal device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the terminal device 100.

[0403] The GPIO interface can be configured via software. The GPIO interface can be configured as either a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to the camera 193, display 194, wireless communication module 160, audio module 170, sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0404] The USB interface 130 is an interface that complies with USB standards and specifications, and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the terminal device 100, or to transfer data between the terminal device 100 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as AR devices.

[0405] It is understood that the interface connection relationship between the modules illustrated in the embodiment of the present invention is merely an illustrative illustration and does not constitute a structural limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may also adopt a different interface connection method from the above embodiment, or a combination of multiple interface connection methods.

[0406] The charging management module 140 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the wireless charging coil of the terminal device 100. While charging the battery 142, the charging management module 140 can also power the electronic device through the power management module 141.

[0407] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and provides power to the processor 110, the internal memory 121, the display 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0408] The wireless communication function of the terminal device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0409] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.

[0410] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the terminal device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0411] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0412] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. applied to the terminal device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, demodulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0413] In some embodiments, the antenna 1 of the terminal device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the terminal device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0414] The terminal device 100 implements display functions through a GPU, display screen 194, and an application processor. The GPU is a microprocessor for image processing that connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.

[0415] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED). In some embodiments, terminal device 100 may include one or N display screens 194, where N is a positive integer greater than 1.

[0416] The terminal device 100 can realize the shooting function through the ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0417] The ISP processes data fed back by camera 193. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then passed to the ISP for processing and converted into a visible image. The ISP can also perform algorithmic optimization on image noise and brightness. It can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within camera 193.

[0418] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the terminal device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0419] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the terminal device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0420] Video codecs are used to compress or decompress digital video. Terminal device 100 may support one or more video codecs. This allows terminal device 100 to play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.

[0421] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU can enable intelligent cognitive applications in the terminal device 100, such as image recognition, face recognition, speech recognition, and text comprehension.

[0422] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).

[0423] Random access memory may include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth generation DDR SDRAM is generally referred to as DDR5 SDRAM), etc.; non-volatile memory may include disk storage devices and flash memory.

[0424] Flash memory can be divided into NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operating principle; single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc. according to the storage cell potential level; universal flash storage (UFS) and embedded multi media card (eMMC) can be divided into UFS and eMMC according to the storage specification.

[0425] The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data.

[0426] The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 110 .

[0427] The external memory interface 120 can be used to connect to an external non-volatile memory to expand the storage capacity of the terminal device 100. The external non-volatile memory communicates with the processor 110 via the external memory interface 120 to implement data storage. For example, files such as music and videos can be stored in the external non-volatile memory.

[0428] The terminal device 100 can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0429] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be provided in the processor 110, or some functional modules of the audio module 170 can be provided in the processor 110.

[0430] The speaker 170A, also called a "speaker", is used to convert audio electrical signals into sound signals. The terminal device 100 can listen to music or listen to hands-free calls through the speaker 170A.

[0431] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals. When the terminal device 100 receives a call or voice message, the user can hear the voice by placing the receiver 170B close to the ear.

[0432] Microphone 170C, also known as "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 170C to input the sound signal into the microphone 170C. The terminal device 100 can be provided with at least one microphone 170C. In other embodiments, the terminal device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the terminal device 100 can also be provided with three, four or more microphones 170C to realize sound signal collection, noise reduction, and can also identify the source of sound, realize directional recording function, etc.

[0433] The headphone jack 170D is used to connect a wired headphone and can be the USB interface 130 or a 3.5mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0434] The pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc.

[0435] The gyro sensor 180B can be used to determine the motion posture of the terminal device 100. In some embodiments, the angular velocity of the terminal device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting.

[0436] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the terminal device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.

[0437] The magnetic sensor 180D includes a Hall sensor, and the terminal device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case.

[0438] The acceleration sensor 180E can detect the magnitude of the acceleration of the terminal device 100 in various directions (generally three axes).

[0439] The distance sensor 180F is used to measure distance. The terminal device 100 can measure distance by infrared or laser.

[0440] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode.

[0441] The ambient light sensor 180L is used to sense the brightness of the ambient light. The terminal device 100 can adaptively adjust the brightness of the display screen 194 according to the sensed ambient light brightness.

[0442] The fingerprint sensor 180H is used to collect fingerprints. The terminal device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0443] The temperature sensor 180J is used to detect temperature. In some embodiments, the terminal device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy.

[0444] The touch sensor 180K is also called a "touch control device." The touch sensor 180K can be provided on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen." The touch sensor 180K is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen 194. In other embodiments, the touch sensor 180K can also be provided on the surface of the terminal device 100, at a location different from that of the display screen 194.

[0445] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone mass in a human vocal part.

[0446] The buttons 190 include a power button, a volume button, etc. The buttons 190 may be mechanical buttons or touch buttons. The terminal device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the terminal device 100.

[0447] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts and can also be used for touch vibration feedback.

[0448] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power level changes, messages, missed calls, notifications, etc.

[0449] The SIM card interface 195 is used to connect a SIM card.

[0450] The following describes the structure of a server 200 provided in an embodiment of the present application. FIG12 exemplarily shows the structure of a server 200 provided in an embodiment of the present application.

[0451] As shown in Figure 12, the server 200 may include: one or more processors 1001, a memory 1002, a communication interface 1003, a transmitter 1005, a receiver 1006, a coupler 1007, and an antenna 1008. These components may be connected via a bus 1004 or other means, with Figure 12 using a bus connection as an example.

[0452] The communication interface 1003 can be used for the server 200 to communicate with other communication devices, such as the terminal device 100. Specifically, the communication interface 1003 can be a 3G communication interface, a 4G communication interface, a 5G communication interface, or a communication interface of a future new air interface. Not limited to a wireless communication interface, the server 200 can also be configured with a wired communication interface 1003, such as a local access network (LAN) interface. The transmitter 1005 can be used to transmit and process the signal output by the processor 1001. The receiver 1006 can be used to receive and process the mobile communication signal received by the antenna 1008.

[0453] In some embodiments of the present application, transmitter 1005 and receiver 1006 can be considered a wireless modem. In server 200, the number of transmitters 1005 and receivers 1006 can be one or more. Antenna 1008 can be used to convert electromagnetic energy in a transmission line into electromagnetic waves in free space, or vice versa. Coupler 1007 is used to split the mobile communication signal received by antenna 1008 into multiple paths and distribute them to multiple receivers 1006.

[0454] Memory 1002 is coupled to processor 1001 and is used to store various software programs and / or multiple sets of instructions. Specifically, memory 1002 may include high-speed random access memory and may also include non-volatile memory, such as one or more disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. Memory 1002 may store a network communication program that can be used to communicate with one or more additional devices, one or more terminal devices, or one or more network devices.

[0455] In some embodiments of the present application, the memory 1002 may be used to store an implementation program of the application distribution method provided by one or more embodiments of the present application on the server 200 side. For implementation of the application distribution method provided by one or more embodiments of the present application, please refer to the above embodiments.

[0456] The processor 1001 may be configured to read and execute computer-readable instructions. Specifically, the processor 1001 may be configured to call a program stored in the memory 1002, such as a program for implementing the application distribution method provided in one or more embodiments of the present application on the server 200 side, and execute the instructions contained in the program.

[0457] It should be noted that the server 200 shown in FIG12 is only one implementation of the embodiment of the present application. In actual applications, the server 200 may also include more or fewer components, which is not limited here.

[0458] For more details about the functions and working principles of the server 200, please refer to the relevant content in the above embodiments, which will not be repeated here.

[0459] The various implementation modes of this application can be combined arbitrarily to achieve different technical effects.

[0460] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described herein are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0461] Those skilled in the art will appreciate that all or part of the process steps in the above-described method embodiments can be implemented by a computer program instructing the relevant hardware. The program can be stored in a computer-readable storage medium, and when executed, the program can include the process steps in the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

[0462] In short, the above description is only an embodiment of the technical solution of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made based on the disclosure of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for image processing in a terminal-cloud collaborative manner, characterized in that: Applied to an image processing system, the system includes an electronic device and a server, and the method includes: The electronic device acquires a first image to be processed; The electronic device sends a first area map of the first image to the server through a first request message; the first area map includes images within a partial or entire area of ​​the first image; The electronic device acquires a second image to be processed, and the second region map includes images within a part or all of the region of the second image; The electronic device sends a first differential image to the server through a second request message, where the first differential image is a differential image between the second region image of the second image and the first region image of the first image; The server restores the second area map according to the first differential image and the first area map; The server performs image processing on the second area map to obtain a refined image of the second area map; The server sends a second response message to the electronic device, where the second response message is used to indicate a refined image of the second area image; The electronic device determines a refined image of the second image based on the refined image of the second region image.

2. The method according to claim 1, characterized in that The second response message includes a second differential image, where the second differential image is a differential image between a refined image of the second region image and the second region image; and the method further includes: The electronic device restores a refined image of the second region map based on the second differential image and the second region map.

3. The method according to claim 1, characterized in that The method further comprises: The server performs image processing on the first area map to obtain a refined image of the first area map; The server sends a first response message to the electronic device, where the first response message is used to indicate a refined image of the first area image; The electronic device determines a refined image of the first image based on the refined image of the first region image.

4. The method according to any one of claims 1 to 3, characterized in that: The electronic device is provided with a continuous shooting function, and the first image and the second image are two images shot in one continuous shooting function; the method further includes: The electronic device detects a first input operation for starting a continuous shooting function; The electronic device acquires a first image to be processed, and the electronic device acquires a second image to be processed, including: In response to the first input operation, the electronic device acquires the first image and the second image of the continuous shooting; the first image is the first image of the continuous shooting, and the second image is a non-first image of the continuous shooting.

5. The method according to any one of claims 1 to 3, characterized in that: The electronic device acquires a first image to be processed, including: In response to the detected first shooting instruction, the camera of the electronic device shoots a first image; The electronic device acquires a second image to be processed, including: In response to the detected second shooting instruction, the camera of the electronic device shoots a second image; The shooting time interval between the second image and the first image is less than a time threshold, and / or the similarity between the second image and the first image is greater than a similarity threshold.

6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: The electronic device acquires a third image to be processed; The electronic device sends a third differential image to the server through a third request message, wherein the third differential image is a differential image between a third area map of the third image and the first area map of the first image; the third area map includes an image within a part or all of the area of ​​the third image; The server restores the third area map according to the third differential image and the first area map; The server performs image processing on the third region image to obtain a refined image of the third region image; The server sends a third response message to the electronic device, where the third response message is used to indicate a refined image of the third area image; The electronic device determines a refined image of the third image based on the refined image of the third region image.

7. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: The electronic device acquires a third image to be processed; The electronic device sends a third differential image to the server through a third request message, wherein the third differential image is a differential image between a third area map of the third image and the second area map of the second image; the third area map includes an image in a partial or entire area of ​​the third image; The server restores the third area map according to the third differential image and the second area map; The server performs image processing on the third region image to obtain a refined image of the third region image; The server sends a third response message to the electronic device, where the third response message is used to indicate a refined image of the third area image; The electronic device determines a refined image of the third image based on the refined image of the third region image.

8. The method according to any one of claims 1 to 7, characterized in that: The electronic device sends the first differential image to the server through a second request message, including: When the data volume of the first differential image is smaller than the data volume of the second area map, the electronic device sends the image identifiers of the first differential image and the first area map to the server through the first request message; When the data volume of the second differential image is smaller than the data volume of the refined image of the second region image, the second response message includes the second differential image and the image identifier of the second region image, and the second differential image is a differential image between the refined image of the second region image and the second region image; When the data size of the second differential image is smaller than the data size of the refined image of the second region map, the second response message includes the refined image of the second region map.

9. The method according to any one of claims 1 to 8, characterized in that: When the image refinement mode is the full image refinement mode, the region map of the image includes the image content in the entire region of the image; When the refinement mode of the second image is the full-image refinement mode, the second image and the second region image are the same, and the refined image of the second region image is the refined image of the second image.

10. The method according to any one of claims 1 to 9, characterized in that: When the image refinement mode is the subject refinement mode, the region map of the image includes the target subject in the image, and the size of the region map of the image is smaller than the size of the image; When the refinement mode of the second image is the subject refinement mode, before the electronic device sends the first difference image to the server through the second request message, the method further includes: The electronic device obtains a position of the second area map in the second image, and crops the second area map from the second image; The electronic device determines a refined image of the second image based on the refined image of the second region image, including: Based on the position of the second region map in the second image, the electronic device replaces the second region map in the second image with a refined image of the second region map to obtain a refined image of the second image.

11. The method according to any one of claims 1 to 10, characterized in that: The first request message includes a first image retouching parameter, where the first image retouching parameter is used to indicate at least one image processing method used for the second image; the server performs image processing on the second region image of the second image to obtain a refined image of the second region image, including: The server performs image processing on the second image according to the at least one image processing method indicated by the first image retouching parameter to obtain a refined image of the second area image.

12. The method according to any one of claims 9 to 11, characterized in that: The electronic device pre-stores a correspondence between a plurality of image processing methods and refinement modes, wherein the refinement modes include a full image refinement mode and a main body refinement mode; The multiple image processing modes include multiple shooting modes, the multiple shooting modes include a portrait mode, and the refinement mode corresponding to the portrait mode is a subject refinement mode; The image processing method used for the image is used to determine the image refinement mode.

13. The method according to any one of claims 1 to 12, characterized in that: The first request message further includes an image identifier of the first region map; the second request message further includes a reference image identifier and a source image identifier of the first differential image, the reference image of the first differential image is the first region map, and the source image of the first differential image is the second region map; The server restores the second area map according to the first differential image and the first area map, including: The server restores the second area map according to the first differential image and the first area map indicated by the reference image identifier, and determines the image identifier of the restored second area map as the source image identifier; and the second response message includes the image identifier of the second area map.

14. The method according to any one of claims 1 to 13, characterized in that: The second request message further includes an algorithm identifier, where the algorithm identifier indicates a first restoration algorithm; The server restores the second area map according to the first differential image and the first area map, including: The server restores the second area map according to the first differential image, the first area map and the first restoration algorithm.

15. A method for image processing in a terminal-cloud collaboration, characterized in that: The method comprises: The electronic device acquires a first image to be processed; The electronic device sends a first area map of the first image to the server through a first request message; the first area map includes images within a partial or entire area of ​​the first image; The electronic device acquires a second image to be processed, and the second region map includes images within a part or all of the region of the second image; The electronic device sends a first differential image to the server through a second request message, where the first differential image is a differential image between a second region image of the second image and the first region image of the first image; the second request message is used to instruct to restore the second region image according to the first differential image, and to obtain a refined image of the second region image; The electronic device receives a second response message sent by the server, where the second response message is used to indicate a refined image of the second area image; The electronic device determines a refined image of the second image based on the refined image of the second region image.

16. The method according to claim 15, characterized in that The second response message includes a second differential image, where the second differential image is a differential image between a refined image of the second region image and the second region image; and the method further includes: The electronic device restores a refined image of the second region map based on the second differential image and the second region map.

17. The method according to claim 15, characterized in that The first request message is used to instruct the server to obtain a refined image of the first area image; the method further includes: The electronic device receives a first response message sent by the server, where the first response message is used to indicate a refined image of the first area image; The electronic device determines a refined image of the first image based on the refined image of the first region image.

18. The method according to any one of claims 15 to 17, characterized in that The electronic device is provided with a continuous shooting function, and the first image and the second image are two images shot in one continuous shooting function; the method further includes: The electronic device detects a first input operation for starting a continuous shooting function; The electronic device acquires a first image to be processed, and the electronic device acquires a second image to be processed, including: In response to the first input operation, the electronic device acquires the first image and the second image of the continuous shooting; the first image is the first image of the continuous shooting, and the second image is a non-first image of the continuous shooting.

19. The method according to any one of claims 15 to 17, characterized in that The electronic device acquires a first image to be processed, including: In response to the detected first shooting instruction, the camera of the electronic device shoots a first image; The electronic device acquires a second image to be processed, including: In response to the detected second shooting instruction, the camera of the electronic device shoots a second image; The shooting time interval between the second image and the first image is less than a time threshold, and / or the similarity between the second image and the first image is greater than a similarity threshold.

20. The method according to any one of claims 15 to 19, characterized in that The method further comprises: The electronic device acquires a third image to be processed; The electronic device sends a third differential image to the server through a third request message, wherein the third differential image is a differential image between a third region image of the third image and the first region image of the first image; the third region image includes an image in a partial or entire region of the third image; and the third request message is used to instruct to restore the third region image according to the third differential image and obtain a refined image of the third region image; The electronic device receives a third response message sent by the server, where the third response message is used to indicate a refined image of the third area image; The electronic device determines a refined image of the third image based on the refined image of the third region image.

21. The method according to any one of claims 15 to 19, characterized in that The method further comprises: The electronic device acquires a third image to be processed; The electronic device sends a third differential image to the server through a third request message, wherein the third differential image is a differential image between a third region image of the third image and the second region image of the second image; the third region image includes an image in a partial or entire region of the third image; and the third request message is used to instruct to restore the third region image according to the third differential image and obtain a refined image of the third region image; The electronic device receives a third response message sent by the server, where the third response message is used to indicate a refined image of the third area image; The electronic device determines a refined image of the third image based on the refined image of the third region image.

22. The method according to any one of claims 15 to 21, characterized in that The electronic device sends the first differential image to the server through a second request message, including: When the data volume of the first differential image is smaller than the data volume of the second area map, the electronic device sends the image identifiers of the first differential image and the first area map to the server through the first request message; When the data volume of the second differential image is smaller than the data volume of the refined image of the second region image, the second response message includes the second differential image and the image identifier of the second region image, and the second differential image is a differential image between the refined image of the second region image and the second region image; When the data size of the second differential image is smaller than the data size of the refined image of the second region map, the second response message includes the refined image of the second region map.

23. The method according to any one of claims 15 to 22, characterized in that When the image refinement mode is the full image refinement mode, the region map of the image includes the image content in the entire region of the image; When the refinement mode of the second image is the full-image refinement mode, the second image and the second region image are the same, and the refined image of the second region image is the refined image of the second image.

24. The method according to any one of claims 15 to 23, characterized in that When the image refinement mode is the subject refinement mode, the region map of the image includes the target subject in the image, and the size of the region map of the image is smaller than the size of the image; When the refinement mode of the second image is the subject refinement mode, before the electronic device sends the first difference image to the server through the second request message, the method further includes: The electronic device obtains a position of the second area map in the second image, and crops the second area map from the second image; The electronic device determines a refined image of the second image based on the refined image of the second region image, including: Based on the position of the second region map in the second image, the electronic device replaces the second region map in the second image with a refined image of the second region map to obtain a refined image of the second image.

25. The method according to any one of claims 15 to 24, characterized in that The first request message includes a first photo retouching parameter, and the first photo retouching parameter is used to indicate at least one image processing method adopted for the second image; the first request message is used to request the server to perform image processing on the second image according to the at least one image processing method indicated by the first photo retouching parameter to obtain a refined image of the second area image.

26. The method according to any one of claims 23 to 25, characterized in that The electronic device pre-stores a correspondence between a plurality of image processing methods and refinement modes, wherein the refinement modes include a full image refinement mode and a main body refinement mode; The multiple image processing modes include multiple shooting modes, the multiple shooting modes include a portrait mode, and the refinement mode corresponding to the portrait mode is a subject refinement mode; The image processing method used for the image is used to determine the image refinement mode.

27. The method according to any one of claims 15 to 26, characterized in that The first request message further includes an image identifier of the first area map; The second request message further includes a reference image identifier and a source image identifier of the first differential image, the reference image of the first differential image is the first region image, and the source image of the first differential image is the second region image; The second response message includes an image identifier of the second area map.

28. The method according to any one of claims 15 to 27, characterized in that The second request message further includes an algorithm identifier, where the algorithm identifier is used to indicate that the server uses a first restoration algorithm to restore the second area map.

29. A method for image processing in end-cloud collaboration, characterized in that: The method comprises: The server receives a first area map of the first image sent by the electronic device through a first request message; the first area map includes an image within a partial or entire area of ​​the first image; The server receives a first differential image sent by the electronic device through a second request message, wherein the first differential image is a differential image between a second area map and the first area map; the second area map includes an image within a part or all of the area of ​​the second image; The server restores the second area map according to the first differential image and the first area map; The server performs image processing on the second area map to obtain a refined image of the second area map; The server sends a second response message to the electronic device, where the second response message is used to indicate a refined image of the second area image; the refined image of the second area image is used to determine a refined image of the second image.

30. The method according to claim 29, characterized in that The second response message includes a second differential image, which is a differential image between a refined image of the second area image and the second area image; the second response message is used to instruct the electronic device to restore the refined image of the second area image based on the second differential image and the second area image.

31. The method according to claim 29, characterized in that The method further comprises: The server performs image processing on the first area map to obtain a refined image of the first area map; The server sends a first response message to the electronic device, where the first response message is used to indicate a refined image of the first area image; the refined image of the first area image is used to determine a refined image of the first image.

32. The method according to any one of claims 29 to 31, characterized in that The method further comprises: The server receives a third differential image sent by the electronic device through a third request message, wherein the third differential image is a differential image between the third area map and the first area map; the third area map includes an image within a part or all of the area of ​​the third image; The server restores the third area map according to the third differential image and the first area map; The server performs image processing on the third region image to obtain a refined image of the third region image; The server sends a third response message to the electronic device, where the third response message is used to indicate a refined image of the third area image; the refined image of the third area image is used to determine a refined image of the third image.

33. The method according to any one of claims 29 to 31, characterized in that The method further comprises: The server receives a third differential image sent by the electronic device through a third request message, wherein the third differential image is a differential image between the third area map and the second area map; the third area map includes an image within a part or all of the area of ​​the third image; The server restores the third area map according to the third differential image and the second area map; The server performs image processing on the third region image to obtain a refined image of the third region image; The server sends a third response message to the electronic device, where the third response message is used to indicate a refined image of the third area image; the refined image of the third area image is used to determine a refined image of the third image.

34. The method according to any one of claims 29 to 33, characterized in that When the data volume of the second differential image is smaller than the data volume of the refined image of the second region image, the second response message includes the second differential image and the image identifier of the second region image, and the second differential image is a differential image between the refined image of the second region image and the second region image; When the data size of the second differential image is smaller than the data size of the refined image of the second region map, the second response message includes the refined image of the second region map.

35. The method according to any one of claims 29 to 34, characterized in that The first request message includes a first image retouching parameter, where the first image retouching parameter is used to indicate at least one image processing method used for the second image; the server performs image processing on the second region image of the second image to obtain a refined image of the second region image, including: The server performs image processing on the second image according to the at least one image processing method indicated by the first image retouching parameter to obtain a refined image of the second area image.

36. The method according to any one of claims 29 to 35, characterized in that The first request message further includes an image identifier of the first region map; the second request message further includes a reference image identifier and a source image identifier of the first differential image, the reference image of the first differential image is the first region map, and the source image of the first differential image is the second region map; The server restores the second area map according to the first differential image and the first area map, including: The server restores the second area map according to the first differential image and the first area map indicated by the reference image identifier, and determines the image identifier of the restored second area map as the source image identifier; and the second response message includes the image identifier of the second area map.

37. The method according to any one of claims 29 to 36, characterized in that The second request message further includes an algorithm identifier, where the algorithm identifier indicates a first restoration algorithm; The server restores the second area map according to the first differential image and the first area map, including: The server restores the second area map according to the first differential image, the first area map and the first restoration algorithm.

38. An electronic device, characterized in that: include: A processor and a memory, wherein the memory is coupled to the processor, and the memory is used to store computer program code, wherein the computer program code includes computer instructions. When the processor reads the computer instructions from the memory, the electronic device executes the end-cloud collaborative image processing method as described in any one of claims 15-28 or claims 29-37.

39. A computer-readable storage medium, characterized in that: It includes computer instructions, which, when executed on a server, enable the server to execute the end-cloud collaborative image processing method as described in any one of claims 15-28 or claims 29-37.

Citation Information

Patent Citations

  • Document uploading method, storage method, downloading method, system, device and equipment

    CN109949898A

  • Method and system for optimizing communication data volume of photographing type meter reading terminal

    CN112712465A

  • Image processing method and device, electronic equipment and readable storage medium

    CN113038002A

  • Image processing method and device and electronic equipment

    CN114119392A

  • Image sharing method and mobile device

    US20220078154A1

Cited By

  • Image retouching method and electronic device

    WO2026170833A1