Image processing method, device and system and electronic equipment
The image is preprocessed by the edge computing end and blurred on the cloud computing end, which solves the problem of long image processing time, and achieves fast and lightweight image blurring, which improves the loading efficiency of the client and reduces the pressure in the cloud.
Patent Information
- Application Number
- CN202411583321.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-04-04
AI Technical Summary
How to process images quickly and load images quickly on the client side to solve the problem of the longer time it takes to process images on the cloud side, especially when processing large or large images.
By assigning image processing tasks to the edge computing end and the cloud computing end to collaborate processing, the edge computing end performs pre-processing of images, adjusts the image to adapt to the client's specifications, reduces the image size, and then the cloud computing end performs blur processing to generate the final blur image.
This method reduces the calculation amount and time cost in the image processing process, reduces the round trip delay of the client requesting image processing, improves image loading efficiency, and reduces the pressure of cloud computing.
Smart Images

Figure CN119767057A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing, and specifically to an image processing method, device, system, electronic device, computer-readable storage medium, and computer program product. Background Art
[0002] With the rapid development of Internet technology and multimedia technology, the transmission of digital information on the Internet has become convenient and fast. People exchange various information through the Internet and conduct online trade. For example, on online shopping platforms, many merchants will display product images to buyers to attract buyers and facilitate orders. When buyers want to browse the product image content on the client, the client sends an image loading request to the cloud computing end, and the cloud computing end sends the image to the client for loading in response to the image loading request. Sometimes, the cloud computing end processes the image and sends it to the client. After the client loads the processed image, it presents the processed image to the buyer. In the above process, it takes a certain amount of time for the cloud computing end to process the image. If there are many or large images to be processed, it may take a long time for the client to load the image.
[0003] Therefore, how to quickly process images and quickly load them on the client is a problem that needs to be solved. Summary of the invention
[0004] The present application provides an image processing method, device, system, electronic device, computer-readable storage medium and computer program product to solve the problem of how to quickly process images and quickly load images on the client, which is currently a problem that needs to be solved.
[0005] In a first aspect, the present application provides an image processing method, comprising: receiving a blur processing request message for a first image sent by a client; sending a preprocessing request message for the first image to an edge computing end, requesting the edge computing end to adjust the first image to an image adapted to the client; obtaining a second image, which is an image adapted to the client obtained after the edge computing end adjusts the first image; blurring the second image to obtain a third image; and sending third image acquisition information for acquiring the third image to the client in response to the blur processing request message.
[0006] Optionally, the method further includes: obtaining image rendering parameters of the client; the requesting the edge computing end to adjust the first image to an image adapted to the client includes: requesting the edge computing end to adjust the first image to an image adapted to the client according to the image rendering parameters of the client;
[0007] Optionally, obtaining the image rendering parameters of the client includes: obtaining screen resolution data of the client and the number of images displayed in each row on the screen of the client; and obtaining image rendering width data of the client as the image rendering parameters of the client based on the screen resolution data of the client and the number of images displayed in each row on the screen of the client.
[0008] Optionally, the blur processing request message carries the screen resolution data of the client and the number of images displayed in each row on the screen of the client; obtaining the screen resolution data of the client and the number of images displayed in each row on the screen of the client includes: obtaining the screen resolution data of the client and the number of images displayed in each row on the screen of the client from the blur processing request message.
[0009] Optionally, it is characterized in that it also includes: setting the image rendering parameters of the client in the preprocessing request message.
[0010] Optionally, the method further includes: obtaining image identification information of the first image; obtaining the first image acquisition information according to a correspondence between the image identification information of the first image and first image acquisition information used to acquire the first image;
[0011] The first image acquisition information is set in the preprocessing request message.
[0012] Optionally, the blur processing request message carries image identification information of the first image; and obtaining the image identification information of the first image includes: obtaining the image identification information of the first image from the blur processing request message.
[0013] Optionally, the first image acquisition information includes first image storage address information for indicating a storage address of the first image in an object storage end.
[0014] Optionally, it also includes: obtaining second image acquisition information sent by the edge computing end for acquiring the second image; the obtaining the second image includes: obtaining the second image according to the second image acquisition information.
[0015] Optionally, the second image acquisition information includes second image storage address information for indicating the storage address of the second image in the object storage end; obtaining the second image according to the second image acquisition information includes: sending a second image acquisition request message to the object storage end, the second image acquisition request message carrying the second image storage address information; obtaining the second image returned by the object storage end.
[0016] Optionally, the blurring the second image includes: performing Gaussian blurring on the second image.
[0017] Optionally, it also includes: storing the third image in an object storage end, obtaining third image storage address information indicating the storage address of the third image in the object storage end; and the third image acquisition information includes the third image storage address information.
[0018] Optionally, it also includes: obtaining the position information of the main object in the second image sent by the edge computing end in the second image; blurring the second image to obtain the third image, including: blurring the main object in the second image according to the position information of the main object in the second image in the second image to obtain the third image.
[0019] In a second aspect, the present application provides an image processing method, including: obtaining a preprocessing request message for a first image sent by a cloud computing end; adjusting the first image to a second image adapted to a client, wherein the client is a client requesting the cloud computing end to perform blur processing on the first image; obtaining second image acquisition information for acquiring the second image; and sending the second image acquisition information to the cloud computing end in response to the preprocessing request message.
[0020] Optionally, the method further includes: obtaining image rendering parameters of the client; and adjusting the first image to be adapted to the second image of the client includes: adjusting the first image to be adapted to the second image of the client according to the image rendering parameters of the client.
[0021] Optionally, the preprocessing request message carries image rendering parameters of the client; and obtaining the image rendering parameters of the client includes: obtaining the image rendering parameters of the client from the preprocessing request message.
[0022] Optionally, the image rendering parameters of the client include image rendering width data of the client.
[0023] Optionally, it also includes: storing the second image to the object storage end; obtaining the second image acquisition information for acquiring the second image includes: obtaining second image storage address information indicating the storage address of the second image in the object storage end; sending the second image acquisition information to the cloud computing end in response to the preprocessing request message includes: sending the second image storage address information to the cloud computing end in response to the preprocessing request message.
[0024] Optionally, it also includes: obtaining a blur processing request message for the first image sent by the client; forwarding the blur processing request message to the cloud computing end; the obtaining of the pre-processing request message for the first image sent by the cloud computing end includes: obtaining the pre-processing request message sent by the cloud computing end in response to the blur processing request message.
[0025] Optionally, it also includes: determining whether a third image obtained after blurring the first image is cached; forwarding the blurring request message to the cloud computing end includes: if the third image is not cached, forwarding the blurring request message to the cloud computing end.
[0026] Optionally, the preprocessing request message carries first image acquisition information for acquiring the first image; and the method further includes: acquiring the first image according to the first image acquisition information.
[0027] Optionally, the first image acquisition information includes first image storage address information for indicating the storage address of the first image in the object storage end; acquiring the first image according to the first image acquisition information includes: sending a first image acquisition request message for requesting to acquire the first image to the object storage end, the first image acquisition request message carrying the first image storage address information; and obtaining the first image sent by the object storage end.
[0028] Optionally, it also includes: detecting the position information of the main object in the second image; and sending the position information of the main object in the second image to the cloud computing end in response to the pre-processing request message, so as to instruct the cloud computing end to blur the main object in the second image.
[0029] In the third aspect, the present application provides an image processing device, including: a request receiving unit, receiving a blur processing request message for a first image sent by a client; a preprocessing request sending unit, sending a preprocessing request message for the first image to an edge computing end, requesting the edge computing end to adjust the first image to an image adapted to the client; a second image obtaining unit, obtaining a second image, wherein the second image is an image adapted to the client obtained after the edge computing end adjusts the first image; a third image obtaining unit, performing blur processing on the second image to obtain a third image; and a request message feedback unit, sending third image acquisition information for obtaining the third image to the client in response to the blur processing request message.
[0030] In a fourth aspect, the present application provides an image processing device, comprising: a preprocessing request receiving unit, which obtains a preprocessing request message for a first image sent by a cloud computing end; a second image generating unit, which adjusts the first image to a second image adapted to a client, wherein the client is a client requesting the cloud computing end to perform blur processing on the first image; a second image acquisition information acquiring unit, which obtains second image acquisition information for acquiring the second image; and a preprocessing request feedback unit, which sends the second image acquisition information to the cloud computing end in response to the preprocessing request message.
[0031] In a fifth aspect, the present application provides an image processing system, including an edge computing end, a cloud computing end, and an object storage end, including: an edge computing end, used to obtain a pre-processing request message for a first image sent by a cloud computing end; adjusting the first image to a second image adapted to a client, wherein the client is a client requesting the cloud computing end to perform blur processing on the first image; obtaining second image acquisition information for acquiring the second image; sending the second image acquisition information to the cloud computing end in response to the pre-processing request message; a cloud computing end, used to receive a blur processing request message for the first image sent by the client; sending a pre-processing request message for the first image to the edge computing end, so as to Request the edge computing end to adjust the first image to an image adapted to the client; obtain a second image, which is an image adapted to the client obtained after the edge computing end adjusts the first image; perform blur processing on the second image to obtain a third image; in response to the blur processing request message, send third image acquisition information for acquiring the third image to the client; an object storage end is used to store the uploaded first image, the second image generated by the edge computing end, and the third image generated by the cloud computing end; it is also used to generate first image storage address information, second image storage address information, and third image storage address information; and synchronously cache the third image on the edge computing end.
[0032] In a sixth aspect, the present application provides an electronic device comprising: a processor, a memory, and computer program instructions stored in the memory and executable on the processor; when the processor executes the computer program instructions, it implements the method described in any one of the first and second aspects.
[0033] In a seventh aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method described in any one of the first and second aspects.
[0034] In an eighth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the method described in any one of the first and second aspects.
[0035] Compared with the prior art, this application has the following advantages:
[0036] The image processing method provided in an embodiment of the present application includes, after receiving a blur processing request message for a first image sent by a client, sending a pre-processing request message for the first image to an edge computing end, requesting the edge computing end to adjust the first image to an image adapted to the client; obtaining a second image, which is an image adapted to the client obtained after the edge computing end adjusts the first image; then, blurring the second image to obtain a third image, and sending third image acquisition information for acquiring the third image to the client.
[0037] The image processing method provided in the embodiment of the present application involves blurring an image, and the blurring of the image is divided into two parts, the first part involves image preprocessing performed by the edge computing end, and the second part involves blurring performed by the cloud computing end. After the edge computing end preprocesses the original image, the size and dimensions of the original image are adjusted to the specifications adapted to the client, and the preprocessed image is the second image. The size of the second image is generally smaller than the original image. Therefore, when blurring the second image, the amount of calculation for blurring becomes smaller, the calculation time is shortened, and the third image is obtained after blurring the second image. The third image is the final image after blurring, and the third image will be loaded and displayed by the client. Therefore, the image processing method provided in the embodiment of the present application can efficiently realize the blurring of the image, which not only reduces the amount of calculation and time cost in the image processing process, but also reduces the round-trip delay of the client requesting image processing. At the same time, since the blurred image becomes smaller, the time required for rendering on the client is also reduced accordingly, and the loading efficiency is improved. Moreover, the image processing method provided in the embodiment of the present application allocates the image preprocessing to the edge computing end for processing, thereby reducing the pressure of cloud computing. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 is a schematic diagram of an application scenario of the image processing method provided in an embodiment of the present application;
[0039] Figure 2 is a schematic diagram of the execution process of the image processing method provided in the embodiment of the present application;
[0040] Figure 3 is a flowchart of the image processing method provided in Example 1 of the present application;
[0041] Figure 4is a flow chart of the image processing method provided in Embodiment 2 of the present application;
[0042] Figure 5 is a unit block diagram of an image processing device provided in Embodiment 3 of the present application;
[0043] Figure 6 is a unit block diagram of an image processing device provided in Embodiment 4 of the present application;
[0044] Figure 7 is a structural diagram of an image processing system provided in Embodiment 5 of the present application;
[0045] Figure 8 This is a structural block diagram of an electronic device provided in Example 6 of the present application. DETAILED DESCRIPTION
[0046] In order to enable those skilled in the art to better understand the technical solution of the present application, the present application is described clearly and completely below in conjunction with the drawings in the embodiments of the present application. However, the present application can be implemented in many other ways different from the following description. Therefore, based on the embodiments provided by the present application, all other embodiments obtained by those of ordinary skill in the art without creative work should fall within the scope of protection of the present application.
[0047] It should be noted that the terms "first", "source domain", "third", etc. in the claims, description and drawings of the present application are used to distinguish similar objects and are not used to describe a specific order or sequence. The data used in this way are interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including", "having" and their variants are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0048] The image generated by the image processing method provided in this application can be displayed on an online platform for displaying images on a buyer user client. An online platform refers to a platform that relies on the Internet, is initiated on the Internet, and is entirely or mostly conducted on the Internet. An online platform can be a shopping platform, a food delivery platform, an instant messaging platform, an auction platform, and other platforms that need to display images on the screen of a terminal device.
[0049] In order to facilitate understanding of the method embodiments of the present application, the application scenarios are introduced. Figure 1 , Figure 1Schematic diagram of the application scenario of the solution provided in the embodiment of the present application. When the buyer performs a specified triggering action on the client 101, the image processing method provided in the embodiment of the present application takes effect. The buyer user client 101 can be a mobile phone, tablet computer (pad), vehicle-mounted device, wearable device, smart TV, virtual reality VR device, laptop computer, desktop computer and other devices capable of displaying images. The client 101 can be connected to the Internet using the network signal provided by the base station, and the image can be loaded and displayed on the screen of the buyer user client 101 through the network. The buyer can see the image 102 on the screen of the client 101, and the image 102 can be used to display the corresponding product information.
[0050] In order to facilitate understanding of the various embodiments of the present application, the application background of the embodiments is described.
[0051] In online shopping platforms, many merchants will display products to buyers in the form of images to attract buyers and facilitate orders. The products listed by merchants can include new or customizable products, and product images are provided to buyers so that buyers can see and understand product information. However, in order to prevent new or customized models from being stolen by external channels, merchants usually do not want to publicly display all the details of the image to all buyers; at the same time, the original image takes a long time to load on the client, which is easy to affect the user experience. Therefore, the image can be blurred and displayed to the buyer's client. The blurred image can protect the details of the image to a certain extent, and at the same time, it can also increase the speed of loading the image on the client.
[0052] Online shopping platforms can recommend products to users in the form of images. After seeing the product image, users click to enter the product details page, then click on the purchase entrance to generate an order, successfully place the order after payment, and wait for the merchant to ship the product.
[0053] For B-end buyers (including enterprises, institutions, organizations, etc., which purchase goods or services as buyers), the online shopping platform is also provided with a customization entrance 103, which provides customizable goods for B-end buyers. Through this entrance, recommendation information of customizable goods can be obtained, and the recommendation information includes image information of customizable goods. Customizable goods are generally products that can be personalized, manufactured or modified according to the specific needs, preferences or brand requirements of customers. For example, customized information such as the company's cultural slogan or company name is added to a certain product. Such products are widely used in various fields to meet the unique needs of customers and enhance the added value and market competitiveness of products.
[0054] For B-end buyers, online shopping platforms also provide a new model recommendation mechanism, through which buyers can obtain new product recommendation information in a timely manner. New products are often the latest products released by merchants, which can reflect the latest design trends, technological innovations or consumer needs. New product recommendation information includes relevant images of new products. Therefore, it is necessary to protect the product when other merchants have not yet released similar products and other consumers have not yet obtained information about new products.
[0055] Among the numerous buyer users, there are buyer users who have established a trust relationship with the merchant. The merchant can choose to display the unblurred image on the client of such buyer. For example, the number of transactions made by the buyer in the merchant's store, the buyer's evaluation value, and the buyer's membership level in the merchant's store are combined to form a screening mechanism for buyers. The screening mechanism is used to screen buyers. The selected buyers can obtain the unblurred image on the client, while the unselected buyers can obtain the blurred image on the client. The blurred image can also allow buyers to understand the basic information of the product.
[0056] If the original product image is displayed on the client, it will take a long time for the buyer's client to load the image and occupy a large storage space. The buyer will spend a long time browsing the product, which has a significant impact on the buyer's user experience. Therefore, using product images that occupy less storage space and load faster can help optimize the buyer's user experience. Moreover, even blurred images are sufficient to provide buyers with basic information about the product.
[0057] Common image blur algorithms include mean blur, median blur, Gaussian blur, etc. Gaussian blur has obvious advantages: more natural smoothing effect, better noise suppression effect, and fast calculation speed. However, Gaussian blur has a large number of parameters and calculations, which leads to a large resource occupation and processing time of cloud computing tasks, so the performance of Gaussian blur of the original image may be affected.
[0058] In order to solve the above problems, the embodiments of the present application provide an image processing method, an electronic device and a computer-readable storage medium, which are intended to efficiently and lightly blur images and enable clients to quickly load images, thereby optimizing the service quality of client images, improving the user experience of buyers, and facilitating orders.
[0059] In order to reduce the computing pressure on the cloud computing end, the embodiment of the present application combines the cloud computing and edge computing models. The cloud computing end is mainly responsible for computing-intensive tasks (image blur processing), and the edge computing end is mainly responsible for network distribution tasks (edge caching and preprocessing of images, etc.). The image processing tasks are split into a form of collaborative processing by the cloud computing end and the edge computing end, which can achieve fast blurring of the image and improve the efficiency of loading blurred images on the client.
[0060] The image processing method provided in the embodiment of the present application includes main execution entities such as an edge computing end, a cloud computing end, and an object storage end, and each entity performs its own task sequentially or synchronously. The original image is preprocessed before blurring the image, and the image is compressed before blurring. The preprocessing of the image can be completed in the edge computing end. The edge computing end generates the preprocessed image and stores it in the object storage end, and sends the image storage address to the cloud computing end so that the cloud computing end can blur the compressed image. The performance of blurring the compressed image is higher than that of blurring the original image, and the required computing time and resources are less. Among them, the cloud computing end can also be called a cloud computer room, the edge computing end can be called an edge cloud cluster, and the object storage end can be called a cloud storage end.
[0061] Please refer to Figure 2 , Figure 2 A flowchart of an image processing method provided in an embodiment of the present application. Figure 2 The corresponding relationship between the steps and each part of the architecture is also included. The architecture provided by the embodiment of the present application mainly includes a wireless device 201, an edge computing terminal 202, a cloud computing terminal 203, an object storage terminal 204, a base station 205 and an operator core network 206.
[0062] The wireless device 201 is a type of buyer user client. The buyer user can access the online shopping platform through the wireless device and browse product images.
[0063] The edge computing end 202 is an edge cloud cluster composed of edge nodes, which is a cloud computing architecture that aims to bring computing and storage capabilities closer to the data source or user's edge device. Unlike traditional centralized cloud computing, edge computing ends disperse resources to the edge of the network to reduce latency and increase speed and bandwidth efficiency.
[0064] The cloud computing end 203 is a facility that provides cloud computing services and is mainly used to store, manage and process data. Compared with traditional data centers, cloud computing ends generally have higher flexibility, scalability and resource utilization efficiency.
[0065] The object storage end 204 refers to the remote address where the object is stored in the cloud, which can usually be the URL address of the image storage. URL (Uniform Resource Locator) is a uniform resource locator, which can be used to locate the address of resources on the Internet. It consists of a protocol (such as HTTP or HTTPS), a domain name, a path, and optional query parameters. The image URL address is a string that can provide information about the location and access method of the image resource on the network. Through this address, users can access and view the image through a browser or other network tools. Therefore, the image stored in the cloud can be found through the URL address of the image.
[0066] The base station 205 provides wireless signals for the wireless device 201, so that the wireless device can access the Internet for use. The wireless device 201 can connect to the edge computing end 202 through the base station 205 and transmit data. The base station is the infrastructure of the mobile communication network, responsible for the reception and transmission of wireless signals. In a mobile network, the edge cloud can usually be deployed on the access side of the operator's base station, in a convergence room, or in a higher-level regional data center. This deployment method can further reduce latency and improve service quality. The base station and edge cloud cluster can work together to provide users with better communication services. For example, in an autonomous driving scenario, the base station can provide wireless coverage and signal transmission, while the edge cloud can perform real-time data processing and analysis to improve the safety and accuracy of autonomous driving.
[0067] The operator core network 206 (Core Network), referred to as CN, is a key component of the communication network. The core network is located in the network subsystem and is the core part of the mobile network. It is mainly responsible for connecting the received call requests or data requests to different networks, realizing data processing and distribution, and routing switching. The core network and base stations work together to provide users with high-quality mobile communication services.
[0068] It can be seen from this that the connection between the wireless device 201 and the cloud computing end 204 can pass through the edge computing end 202. Therefore, the edge computing end is more convenient for processing data between the wireless device 201 and the cloud computing end 204.
[0069] The following references Figure 2 , the image processing method provided in the embodiment of the present application is described in detail.
[0070] S201: Request image blur processing. This step is used for the wireless device 201 to send an image blur processing request to the edge computing end 202. At the same time, the wireless device 201 also sends rendering-related data such as the screen resolution of its own device and the number of images displayed in each row to the edge computing end 202.
[0071] S202: Determine whether there is a blurred image in the cache. This step is used by the edge computing end to determine whether there is a blurred image corresponding to the target image in its own cache.
[0072] S202-1: If yes, return the blurred image in the cache. If there is a blurred image in the cache, there is no need to continue preprocessing and blurring the image.
[0073] S202-2: If not, send the target image ID, screen resolution, and the number of images displayed in each row. This step is specifically used to further process the target image when the blurred image corresponding to the target image does not exist in the cache. The screen resolution and the number of images displayed in each row are sent by the wireless device 201 to the edge computing end 202. In step S202-2, the edge computing end 202 sends the data to the cloud computing end 203 through the operator core network so that the cloud computing end 203 can perform the next step of image processing.
[0074] The target image ID can be automatically generated. For example, when uploading an image to a website or online platform, the cloud usually automatically generates a unique ID for each image. Through the target image ID, the cloud can find the target image. When the user opens the page on the client, the cloud first finds the image to be displayed on the client, and the cloud also transmits the image ID to be displayed back to the client, and also transmits information such as membership level and user evaluation value back to the client. The client sends an image blur request message based on the returned information.
[0075] The cache may be a CDN cache. CDN (Content Delivery Network), also known as content distribution network), is a technology that adds a new layer of network architecture to the existing Internet to publish the content of the website to the "edge" of the network closest to the user, so that the user can obtain the required content nearby, thereby solving the problem of Internet network congestion and improving the response speed of users accessing the website. The basic principle of CDN cache is to use cache servers distributed in various places to cache the content of the source station on these servers. In the embodiment of the present application, the source station can be an edge computing end, a cloud computing end, an object storage end, etc. When a user accesses certain content, it can be obtained directly from the nearest cache server without going back to the source station. This can greatly reduce the back-to-source request, reduce the load of the source station, and improve the user's access speed and experience. The CDN cache system is usually composed of a distribution service system, a load balancing system, and an operation management system. The distribution service system is mainly responsible for the response, caching and synchronization of resources; the load balancing system is responsible for balancing the load of multiple content caching devices at a single point, and caches the content. Load balancing and access control, as well as scheduling and routing user requests; the operation management system is responsible for operation demand management and network system management. If CDN caching is used, page loading speed will usually be significantly improved.
[0076] S203: Initiate an image preprocessing request. This step is used by the edge computing end 202 to perform image preprocessing and generate a preprocessed image.
[0077] Before initiating an image preprocessing request, the cloud computing end 203 generates an image rendering width. After receiving the screen resolution and the number of images displayed in each row, the cloud computing end 203 obtains the image rendering width according to the screen resolution (resolution=height*width, unit pixel px) and the number of images displayed in each row (imgNum). The image rendering width refers to the width of the rendered image displayed on the wireless device. Image rendering width targetPicWidth=width / imgNum. Before initiating an image preprocessing request, the cloud computing end 203 queries the corresponding target image URL address according to the image ID.
[0078] The preprocessing request may be a CDN image preprocessing request, which specifically includes: determining a CDN service provider, inputting an image URL, configuring preprocessing parameters, and submitting a preprocessing request; after the processing is completed, the CDN service provider usually provides a new URL pointing to the processed image.
[0079] The cloud computing end 203 initiates an image preprocessing request to the edge computing end 202 based on the target image URL address and the image rendering width.
[0080] The edge computing end 202 receives the image preprocessing request sent by the cloud computing end 203, performs preprocessing on the target image, generates a preprocessed image, and uploads it to the object storage end 204, and generates a corresponding URL address, where the URL address is the URL address of the preprocessed image, which is different from the URL address of the target image before processing. The URL address of the preprocessed image generated by the object storage end 204 is returned to the edge computing end 202.
[0081] S204: Send the URL address of the preprocessed image. In the previous step, the edge computing end 202 obtains the URL address of the preprocessed image. In step S204, the edge computing end 202 sends the URL address of the preprocessed image to the cloud computing end 203 so that the cloud computing end 203 performs Gaussian blur processing on the preprocessed image.
[0082] S205: blur the image according to the blur task parameters. Specifically, the cloud computing end 203 sends an HTTP request to the object storage end 204, downloads the pre-processed image to a local temporary file directory, and performs a Gaussian blur algorithm on the pre-processed image to generate a Gaussian blurred image. This step has completed the blurring of the target image.
[0083] S206: Upload the blurred image. The cloud computing end 203 stores the generated blurred image in the object storage end 204, thereby obtaining the URL address corresponding to the blurred image returned by the object storage end, that is, the URL address of the image after the target image is blurred. If the blurred image is needed later, the corresponding blurred image can be obtained through the URL address.
[0084] S207: Cache the blurred image. Through this step, the URL address of the blurred image in the object storage end 204 will be cached in the edge computing end 202 synchronously.
[0085] S208: Sending the URL of the blurred image. The cloud computing end 203 sends the URL address of the blurred image to the wireless device 201.
[0086] S209: Requesting to obtain the blurred image. After the wireless device 201 receives the URL address of the blurred image, the wireless device 201 initiates an HTTP request to the object storage end 204 to request to obtain the blurred image from the object storage end 204.
[0087] S210: Sending the blurred image. The object storage end 204 sends the blurred image to the wireless device 201, and the wireless device 201 loads the blurred image in the interface.
[0088] The image processing method of the embodiment of the present application has higher image processing efficiency and better user experience. The process of generating a blurred image using the image processing method of the embodiment of the present application occupies less computing resources on the cloud computing end and takes a short time, so that the user terminal can quickly load the blurred image, while also better ensuring the privacy of the product.
[0089] Embodiment 1
[0090] This embodiment provides an image processing method, which is executed by a cloud computing end.
[0091] like Figure 3 As shown, the image processing method provided in this embodiment includes the following steps:
[0092] S301: receiving a blur processing request message for a first image sent by a client. This step is used to receive the blur processing request message.
[0093] The user triggers the entrance to view certain private products on the buyer's client, and the client sends a blur request to the server, requesting the server to blur the current image. The server can be understood as a cloud computing end. Traditional servers are usually composed of multiple servers, providing data and calculations for computers. The cloud computing end provides cloud computing services, mainly for storing, managing and processing data. Compared with traditional data centers, cloud computing ends usually have higher flexibility, scalability and resource utilization efficiency. The current image is the first image, and it can also be the original image uploaded by the seller (merchant).
[0094] S302: Send a preprocessing request message for the first image to the edge computing end, so as to request the edge computing end to adjust the first image to an image suitable for the client.
[0095] When merchants list products on the platform, they usually only upload 1-2 images of different sizes, which can be called original images or first images. The first image often has high image quality, clarity, and a size that can better highlight the characteristics of the product. However, since the devices of the buyer's client are different, the screen size and resolution of each device are different. In order to enable different buyers to see the same image on different devices and have the best possible display effect, the first image needs to be adapted to a better resolution based on the relevant display data of the buyer's client.
[0096] The preprocessing of the first image by the edge computing end can adapt the original image uploaded by the merchant to the buyer's client screen, thereby achieving a better display effect.
[0097] S303: Obtain a second image, where the second image is an image adapted to the client obtained after the edge computing end adjusts the first image.
[0098] After the image preprocessing in step S302, a second image adapted to the buyer's client is obtained.
[0099] S304: Perform blur processing on the second image to obtain a third image.
[0100] The second image is a preprocessed image. The third image can be obtained by blurring the second image. The third image can usually be realized by using Gaussian blur.
[0101] The Gaussian blur algorithm is an image processing technique used to reduce the noise and details of an image to make it appear smoother. The algorithm produces a blurring effect by taking a weighted average of the color values of each pixel and using a Gaussian function (bell curve) to calculate the degree of influence of surrounding pixels. Gaussian blur is widely used in image editing, computer vision, and special effects production, and is often used for tasks such as background blurring, image smoothing, and feature extraction.
[0102] S305: In response to the blur processing request message, third image acquisition information for acquiring the third image is sent to the client. This step is used for the cloud computing end to respond to the blur processing request message for the first image sent by the client.
[0103] The third image obtained in step S304 is the image obtained after the final processing, which can be directly displayed on the buyer's client. The client sends a request to the cloud computing end, and the cloud computing end should feedback the processing result to the client after processing the request. In this step, the cloud computing end sends the third image acquisition information for acquiring the third image to the client, wherein the third image acquisition information for acquiring the third image can be the URL address corresponding to the third image.
[0104] It is worth noting that before step S302, the edge computing end will make another judgment. When the client initiates an image blur processing request, the edge computing end will receive the blur processing request first. Since the edge computing end can realize the pre-processing of the image and also has the function of caching, after the first image is processed to generate the third image, the third image will be synchronously cached on the edge computing end. In this way, if the third image corresponding to the first image has been generated before, then the next time the blur processing is requested for the first image, the edge computing end is likely to have cached the third image. At this time, it is only necessary to load the third image from the storage address to the buyer's client, and there is no need to blur it again, which can save time and improve the efficiency of image processing. Therefore, before step S302, the edge computing end will determine whether the blurred image of the first image is cached. If not, step S303 will be executed. If it exists, the cached image will be directly returned.
[0105] Optionally, it also includes: obtaining image rendering parameters of the client; requesting the edge computing end to adjust the first image to an image suitable for the client, including: requesting the edge computing end to adjust the first image to an image suitable for the client according to the image rendering parameters of the client.
[0106] Optionally, obtaining the image rendering parameters of the client includes: obtaining screen resolution data of the client and the number of images displayed in each row on the screen of the client; and obtaining image rendering width data of the client as the image rendering parameters of the client based on the screen resolution data of the client and the number of images displayed in each row on the screen of the client.
[0107] As mentioned above, each electronic device of each buyer may have a different screen size, resolution, etc. Therefore, it is necessary to adapt the first image according to the screen parameters of the client. Specifically, according to the screen resolution data of the client and the number of images displayed in each row on the screen of the client, the image rendering width data of the client is obtained as the image rendering parameter of the client. Generally, the image rendering width can be obtained by dividing the width of the screen by the number of images displayed in each row on the screen. If the screen resolution is recorded as resolution=height*width, the unit is pixel px, and the number of images displayed in each row on the screen is recorded as imgNum, then the image rendering width targetPicWidth=width / imgNum. Image rendering width is an important parameter in the image rendering process, which determines the horizontal size of the rendered image. The calculation of image rendering width can be completed not only on the cloud computing end, but also on the edge computing end. Of course, the image rendering width can also be obtained directly through settings without calculation.
[0108] The preprocessed second image obtained according to the image rendering width can be well adapted to the buyer's client, so that the buyer user has a better browsing experience. In order to obtain a better image display effect, in a specific application scenario, the first image can also be preprocessed according to other parameters in the image rendering parameters, such as lighting, rendering mode, etc.
[0109] Optionally, the blur processing request message carries the screen resolution data of the client and the number of images displayed in each row on the screen of the client; the obtaining of the screen resolution data of the client and the number of images displayed in each row on the screen of the client includes: obtaining the screen resolution data of the client and the number of images displayed in each row on the screen of the client from the blur processing request message. The client puts the screen resolution data and the number of images displayed in each row on the screen in the blur processing request message and sends it to the cloud computing end.
[0110] Optionally, it is characterized in that it also includes: setting the image rendering parameters of the client in the preprocessing request message.
[0111] When the client sends a blur processing request message for the first image, the blur processing request message for the first image carries the screen resolution data of the buyer's client and the number of images displayed in each row on the screen of the client. After the cloud computing end receives the screen resolution data of the buyer's client and the number of images displayed in each row on the screen of the client, the image rendering parameters of the buyer's client are calculated based on the screen resolution data of the buyer's client and the number of images displayed in each row on the screen of the client, and the image rendering parameters are placed in the preprocessing request message. The edge computing end can preprocess the first image according to the image rendering parameters to obtain the second image.
[0112] Optionally, it also includes: obtaining image identification information of the first image; obtaining the first image acquisition information according to the correspondence between the image identification information of the first image and first image acquisition information used to acquire the first image; and setting the first image acquisition information in the preprocessing request message.
[0113] The image identification information may generally be an image ID. The image ID is a unique identifier of an image. An image can be uniquely identified by the image ID. Each image has a different image ID.
[0114] The first image acquisition information may generally be a URL address, which is an address where the first image is stored. The corresponding image may be found in the object storage end through the URL address.
[0115] The cloud computing end stores the correspondence between the image identification information of the first image and the first image acquisition information used to acquire the first image. After acquiring the image identification information of the first image, the corresponding URL address can be found according to the correspondence.
[0116] The cloud computing end queries the corresponding image URL address according to the image ID. Specific implementation methods may include:
[0117] 1. Determine the backend interface or database
[0118] First, you need to identify a backend interface or database that can return the corresponding image URL address based on the image ID.
[0119] 2. Send a request to the backend interface
[0120] By sending an HTTP request (such as a GET or POST request) to the interface, and including the image ID as a parameter in the request, the backend interface will query the database or execute other logic according to the image ID after receiving the request, and then return the corresponding image URL address.
[0121] 3. Query the database
[0122] If the image ID and image URL are stored in a database, you need to write a query to retrieve this information. The query may be a SQL query that retrieves the corresponding record based on the image ID as a primary key or unique identifier.
[0123] 4. Process the returned results
[0124] The results returned by the backend interface or database query contain the image URL address.
[0125] The URL address corresponding to the first image is set in the preprocessing request message so that the edge computing end preprocesses the first image.
[0126] Optionally, the blur processing request message carries image identification information of the first image; and obtaining the image identification information of the first image includes: obtaining the image identification information of the first image from the blur processing request message.
[0127] The blur processing request message sent by the client also carries the image identification information of the first image, that is, the image ID of the first image, so as to identify the image and the request message.
[0128] Optionally, the first image acquisition information includes first image storage address information for indicating a storage address of the first image in an object storage end.
[0129] The first image is stored in an object storage end, and the object storage end generates first image storage address information of the storage address of the first image in the object storage end. The object storage end assigns a URL address to the first image. Therefore, the first image can be found and obtained according to the URL address of the first image.
[0130] Optionally, it also includes: obtaining second image acquisition information sent by the edge computing end for acquiring the second image; the obtaining the second image includes: obtaining the second image according to the second image acquisition information.
[0131] Optionally, the second image acquisition information includes second image storage address information for indicating the storage address of the second image in the object storage end; obtaining the second image according to the second image acquisition information includes: sending a second image acquisition request message to the object storage end, the second image acquisition request message carrying the second image storage address information; obtaining the second image returned by the object storage end.
[0132] The second image is stored in the object storage end, and the object storage end generates second image storage address information of the storage address of the second image in the object storage end. The object storage end assigns a URL address to the second image. Therefore, the second image can be found and obtained according to the URL address of the second image.
[0133] It can be seen that by sending a second image acquisition request message to the object storage end, the second image can be acquired from the object storage end through the second image storage address information carried in the second image acquisition request message.
[0134] Optionally, the blurring the second image includes: performing Gaussian blurring on the second image.
[0135] Gaussian Blur is an image processing method that aims to smooth an image and reduce noise. When applying Gaussian Blur, the Blur Radius is a key parameter that determines the strength and effect of the blur operation. The Blur Radius is the range of blur that extends outward from a certain pixel in the image when Gaussian Blur is applied. It determines the scale at which the blur algorithm is applied to the image. A larger blur radius produces a stronger blur effect, making the image smoother, but may also cause the image to lose detail and clarity; while a smaller blur radius produces a weaker blur effect and may not effectively remove noise or achieve the desired smoothing effect. The unit of the blur radius is usually pixels. Choosing the right blur radius is an experimental process that needs to be adjusted and tested according to the specific image and application. Generally, the value of the blur radius can be determined based on the size of the noise in the image or the details that need to be blurred.
[0136] For example, in the first embodiment, a Gaussian blur radius of radius=20 is used, and the obtained RTT comparison is shown in the following table:
[0137] Original image size Conventional cloud fuzzy RTT RTT in this embodiment 1MB 939ms 167ms 3MB 1825ms 195ms
[0138] Table 1
[0139] The RRT in the table above is the total time it takes for a data packet to be sent from the sender to the receiver and then for the receiver to send a confirmation message back to the sender. RRT is an important indicator for measuring network latency. A lower RTT means a faster network response and more efficient data transmission, while a higher RTT may mean network congestion, long distance or quality issues.
[0140] In the process of applying Gaussian blur to actually process images, the performance of Gaussian blur may decrease due to the increase in image size. If the processing of Gaussian blur is performed on the cloud computing end, the efficiency of image processing will be affected. Therefore, this embodiment assigns the task of image preprocessing to the edge computing end, reducing the amount of calculation on the cloud computing end and improving the efficiency of image processing.
[0141] Performing Gaussian blur on the second image can generate a third image, and the acquisition of the third image can be achieved through the storage address. Optionally, it also includes: storing the third image in the object storage end, and obtaining third image storage address information indicating the storage address of the third image in the object storage end;
[0142] The third image acquisition information includes the third image storage address information.
[0143] The third image is stored in the object storage end, and the object storage end generates third image storage address information of the storage address of the third image in the object storage end. The object storage end assigns a URL address to the third image. Therefore, the third image can be found and obtained according to the URL address of the third image.
[0144] Optionally, it also includes: obtaining the position information of the main object in the second image sent by the edge computing end in the second image; blurring the second image to obtain the third image, including: blurring the main object in the second image according to the position information of the main object in the second image in the second image to obtain the third image.
[0145] The main object in the second image is an important part of the second image, and is also the area where the characteristics of the product are concentrated. The necessity of blurring the background image or the public image is not high. Therefore, the blurring of the image is mainly performed on the main object in the second image. Specifically, when blurring the second image to obtain the third image, the main object in the second image is first determined, and the position information of the main object relative to the second image is obtained. The edge computing end can obtain the main object and its position information in the second image by first segmenting the image, then detecting the object, and finally extracting the position information. Commonly used position extraction methods can include multiple methods: methods based on image processing libraries, such as OpenCV and Pillow. OpenCV is an open source computer vision library that provides rich image processing and analysis functions. Using OpenCV, you can read images, perform preprocessing (such as smoothing, enhancement, color space conversion, etc.), segment images (such as using the GrabCut algorithm), and detect specific objects (such as using the Haar feature classifier for face detection). Pillow is a branch of the Python Imaging Library (PIL) that provides many convenient image processing functions. Using Pillow, you can load images, convert to grayscale images, perform correlation matching, and other operations to find the location of objects in the image. It can also include machine learning-based methods, such as object detection algorithms and deep learning models. Object detection algorithms: such as HOG (Histogram of Oriented Gradients), YOLO (You Only Look Once), SSD (Single Shot Detector), etc. These algorithms can train models to identify specific objects in images and return their location information. Deep learning models: Using deep learning models such as convolutional neural networks (CNN) for image analysis can automatically identify the main objects in the image and mark their locations. This method usually requires a large amount of training data and computing resources.
[0146] The cloud computing end performs blur processing on the main object in the second image according to the position information of the main object in the second image sent by the edge computing end, thereby obtaining the third image. It can be seen that in this embodiment, the third image is generated by blurring a specific area or object in the second image, rather than blurring the entire second image after preprocessing. This process also reduces the amount of calculation and processing time of image blurring processing on the cloud computing end.
[0147] The image processing method provided in this embodiment optimizes the original blur processing independently completed by the cloud computing end to the image blur processing jointly processed by the cloud computing end and the edge computing end. In the image processing method provided in this embodiment, after the edge computing end preprocesses the original image, the size and dimensions of the original image are adjusted to the specifications adapted to the client, and the preprocessed image is the second image. The size of the second image is generally smaller than the original image. Therefore, when blurring the second image, the calculation amount of blurring becomes smaller, and the calculation time is shortened. After the blurring of the second image, the third image is obtained, and the third image is the final image after blurring. The third image will be sent to the client and displayed. Therefore, the image processing method provided in this embodiment can efficiently blur the image, which not only reduces the calculation amount and time cost in the image processing process, but also reduces the round-trip delay of the client requesting image processing. At the same time, due to the reduction in the size of the blurred image, the time and memory required for client rendering are also reduced accordingly.
[0148] Embodiment 2
[0149] This embodiment also provides an image processing method, the execution subject of the image processing method is an edge computing end, and the edge computing end is mainly used for image preprocessing. Since the steps of the image processing method in this embodiment are similar to those in the first embodiment, but the execution subject is different, the description of some contents is relatively simple. For the details of the relevant technical features and the effects achieved, please refer to the corresponding description of the image processing method provided in the first embodiment.
[0150] like Figure 4 As shown, the image processing method provided in this embodiment includes:
[0151] S401: Obtaining a preprocessing request message for a first image sent by a cloud computing end. This step is used to receive a preprocessing request.
[0152] After receiving the blur processing request message for the first image sent by the client, the cloud computing end sends a preprocessing request message for the first image to the edge computing end. After receiving the preprocessing request message for the first image sent by the cloud computing end, the edge computing end starts image preprocessing. The first image is usually the original image uploaded by the merchant.
[0153] Image preprocessing is to prepare for further processing of subsequent images to prevent the subsequent processing of images from being too large and taking too long. It can also adapt to different devices and screens to provide good image display effects.
[0154] S402: Adjust the first image to a second image adapted to a client, where the client is a client that requests the cloud computing end to perform blur processing on the first image.
[0155] Since the screen size and resolution of different devices are different, the same original image needs to be adjusted according to the screen information of different devices before it can be displayed normally. The client is a client that requests the cloud computing end to perform blur processing on the first image, and the client is usually a client on the buyer's side.
[0156] Therefore, in order to adapt to the screen of the client, the first image is adjusted to obtain the second image, and the second image has a good display effect on the corresponding client.
[0157] S403: Obtain second image acquisition information for acquiring the second image. The second image can be acquired through the second image acquisition information. The second image acquisition information can generally be a URL address, and the second image corresponds to a URL address. The cloud computing end can acquire the corresponding second image from the corresponding address of the object storage end through the URL address.
[0158] S404: In response to the preprocessing request message, the second image acquisition information is sent to the cloud computing end.
[0159] Steps S402-S403 complete the preprocessing of the first image. At this time, feedback is given to the preprocessing request message for the first image sent by the cloud computing end, and the second image acquisition information is sent to the cloud computing end, so that the cloud computing end obtains the corresponding second image from the corresponding address of the object storage end through the second image acquisition information.
[0160] Optionally, the method further includes: obtaining image rendering parameters of the client; and adjusting the first image to be adapted to the second image of the client includes: adjusting the first image to be adapted to the second image of the client according to the image rendering parameters of the client.
[0161] Image rendering parameters refer to a set of parameters used when processing images or videos. They are used to control various aspects of the rendering process, including color, lighting, material, shadow, etc. The settings of these parameters can affect the quality and effect of the final rendering results.
[0162] Optionally, the preprocessing request message carries image rendering parameters of the client; and obtaining the image rendering parameters of the client includes: obtaining the image rendering parameters of the client from the preprocessing request message.
[0163] Optionally, the image rendering parameters of the client include image rendering width data of the client. Image rendering parameters may also include multiple other parameters, such as shadows, lighting, rendering modes, etc. The image rendering width can be obtained by dividing the width of the screen by the number of images displayed on each line on the screen. The image rendering parameters are set in a preprocessing request message, and the width of the screen divided by the number of images displayed on each line on the screen is set in the blur processing request message. The image rendering parameters are obtained by processing the image rendering related data by dividing the width of the screen by the number of images displayed on each line on the screen by the cloud computing end, and are set in a preprocessing request message and sent to the edge computing end.
[0164] Optionally, it also includes: storing the second image to the object storage end; obtaining the second image acquisition information for acquiring the second image includes: obtaining second image storage address information indicating the storage address of the second image in the object storage end; sending the second image acquisition information to the cloud computing end in response to the preprocessing request message includes: sending the second image storage address information to the cloud computing end in response to the preprocessing request message.
[0165] The edge computing end stores the second image in the object storage end, and the object storage end allocates a storage address for the second image, through which the second image can be found. Therefore, by storing the second image in the object storage end, the storage address information of the second image can be obtained. The second image storage address information can be a URL address of the second image.
[0166] Optionally, it also includes: obtaining a blur processing request message for the first image sent by the client; forwarding the blur processing request message to the cloud computing end; the obtaining of the pre-processing request message for the first image sent by the cloud computing end includes: obtaining the pre-processing request message sent by the cloud computing end in response to the blur processing request message.
[0167] In the whole process of image processing, it is necessary to go through preprocessing on the edge computing end and blur processing on the cloud computing end. The client sends a blur processing request message for the first image, which is first received by the edge computing end. After receiving the blur processing request message for the first image, the edge computing end forwards the blur processing request message to the cloud computing end.
[0168] Optionally, it also includes: determining whether a third image obtained after blurring the first image is cached; forwarding the blurring request message to the cloud computing end includes: if the third image is not cached, forwarding the blurring request message to the cloud computing end.
[0169] Before the edge computing end forwards the blur processing request message to the cloud computing end, a cache judgment is required to determine whether the edge computing end has cached the third image obtained after blur processing of the first image. If the edge computing end has cached the third image obtained after blur processing of the first image, there is no need to blur the first image, so it is only necessary to return the third image cached in the edge computing end. On the contrary, if the edge computing end does not have cached the third image, the blur processing request message is forwarded to the cloud computing end.
[0170] Optionally, the preprocessing request message carries first image acquisition information for acquiring the first image; the method further comprises: acquiring the first image according to the first image acquisition information. The preprocessing request message is sent by the cloud computing end to the edge computing end for preprocessing the first image. The preprocessing request message carries the first image acquisition information for acquiring the first image. After the edge computing end receives the first image acquisition information, it can acquire the first image from the object storage end according to the first image acquisition information, and then preprocess the first image.
[0171] Optionally, the first image acquisition information includes first image storage address information for indicating the storage address of the first image in the object storage end; acquiring the first image according to the first image acquisition information includes: sending a first image acquisition request message for requesting to acquire the first image to the object storage end, the first image acquisition request message carrying the first image storage address information; and obtaining the first image sent by the object storage end.
[0172] The first image acquisition information may be only the storage address of the first image in the object storage end, that is, the first image storage address. After receiving the preprocessing request message, the edge computing end sends a first image acquisition request message to the object storage end for requesting to obtain the first image. The first image acquisition request message carries the first image storage address information. The first image sent by the object storage end is obtained through the first image storage address information, and then the first image is preprocessed.
[0173] Optionally, it also includes: detecting the position information of the main object in the second image; and sending the position information of the main object in the second image to the cloud computing end in response to the pre-processing request message, so as to instruct the cloud computing end to blur the main object in the second image.
[0174] The second image is an image obtained by preprocessing the first image by the edge computing end. Before blurring the second image, the edge computing end also detects the main object in the second image to obtain the position information of the main object in the second image, so that the cloud computing end can blur the main object in the second image.
[0175] The image processing method provided in this embodiment preprocesses the first image to obtain the second image before blurring the original image, and then blurs the second image to obtain the third image. Image preprocessing reduces the computing resources and time required for subsequent image blurring. At the same time, the image preprocessing is undertaken by the edge computing end, and the amount of image processing tasks performed by the cloud computing end is reduced. Furthermore, this embodiment also detects the main object of the second image to obtain the position information of the main object in the second image, so that when the cloud computing end performs blurring, the main blurring area or part is clearly identified, thereby reducing the blurring area or part. Based on the above analysis, the image processing method provided in this embodiment can reduce the resources occupied by image processing and reduce the time of image processing, thereby achieving the technical effect of blurring images quickly and lightly.
[0176] Embodiment 3
[0177] This embodiment provides an image processing device, which includes the image processing method in Embodiment 1. The following description of the embodiment of the image processing device is merely illustrative, and the relevant implementation details can be understood with reference to Embodiment 1.
[0178] Please see Figure 5The image processing device provided in this embodiment includes: a blur processing request receiving unit 501, receiving a blur processing request message for a first image sent by a client; a pre-processing request sending unit 502, sending a pre-processing request message for the first image to an edge computing end, requesting the edge computing end to adjust the first image to an image adapted to the client; a second image obtaining unit 503, obtaining a second image, where the second image is an image adapted to the client obtained after the edge computing end adjusts the first image; a third image obtaining unit 504, performing blur processing on the second image to obtain a third image; and a blur processing request message feedback unit 505, sending third image acquisition information for obtaining the third image to the client in response to the blur processing request message.
[0179] Embodiment 4
[0180] This embodiment provides an image processing device, which includes the image processing method in Embodiment 2. The following description of the embodiment of the image processing device is only illustrative, and the relevant implementation details can be understood by referring to Embodiment 2.
[0181] Please see Figure 6 The image processing device provided in this embodiment includes: a preprocessing request receiving unit 601, which obtains a preprocessing request message for a first image sent by a cloud computing end; a second image generating unit 602, which adjusts the first image to a second image adapted to a client, where the client is a client requesting the cloud computing end to perform blur processing on the first image; a second image acquisition information acquiring unit 603, which obtains second image acquisition information for acquiring the second image; and a preprocessing request feedback unit 604, which sends the second image acquisition information to the cloud computing end in response to the preprocessing request message.
[0182] Embodiment 5
[0183] This embodiment provides an image processing system, which includes the image processing method in Embodiment 1 and the execution body of the image processing method in Embodiment 2. The following description of the embodiment of the image processing system is only illustrative, and the relevant implementation details can be understood by referring to Embodiment 1 and Embodiment 2. Figure 7 As shown, the image processing system provided in this embodiment includes an edge computing end 701 and a cloud computing end 702.
[0184] The image processing system provided in this embodiment includes an edge computing end, a cloud computing end, and an object storage end:
[0185] The edge computing end 701 is configured to obtain a preprocessing request message for a first image sent by a cloud computing end; adjust the first image to a second image adapted to a client, where the client is a client requesting the cloud computing end to perform blur processing on the first image; obtain second image acquisition information for acquiring the second image; and send the second image acquisition information to the cloud computing end in response to the preprocessing request message;
[0186] The cloud computing end 702 is used to receive a blur processing request message for a first image sent by a client; send a pre-processing request message for the first image to an edge computing end to request the edge computing end to adjust the first image to an image adapted to the client; obtain a second image, which is an image adapted to the client obtained after the edge computing end adjusts the first image; perform blur processing on the second image to obtain a third image; and send third image acquisition information for acquiring the third image to the client in response to the blur processing request message;
[0187] It can also include an object storage end 703, which is used to store the uploaded first image, the second image generated by the edge computing end, and the third image generated by the cloud computing end; it is also used to generate the first image storage address information, the second image storage address information, and the third image storage address information; and synchronously cache the third image on the edge computing end.
[0188] The image processing system provided in this embodiment can reduce the amount of calculation and time cost in the image processing process, and can also reduce the round-trip delay of the client requesting image processing. At the same time, since the blurred image becomes smaller, the time and memory required for client rendering are also reduced accordingly, and the loading efficiency is improved. Moreover, the image processing system provided in the embodiment of the present application assigns image pre-processing to edge computing processing, thereby reducing the pressure on cloud computing.
[0189] Embodiment 6 also provides an electronic device embodiment for image processing provided in the first embodiment. The electronic device is a user terminal. The image processing methods of Embodiment 1 and Embodiment 2 can be executed on the user terminal. The user terminal can also include the image processing system in Embodiment 5. The following description of the electronic device embodiment is only illustrative. For related contents, please refer to the aforementioned embodiment. The electronic device embodiment is as follows:
[0190] Please refer to Figure 8 Understand the above electronic device. The electronic device provided in this embodiment includes: a processor 801, a memory 802, a communication bus 803, and a communication interface 804;
[0191] The memory 802 is used to store computer instructions for data processing. When the computer instructions are read and executed by the processor 801, the following steps are performed:
[0192] Receive a blur processing request message for a first image sent by a client; send a preprocessing request message for the first image to an edge computing end, requesting the edge computing end to adjust the first image to an image adapted to the client; obtain a second image, which is an image adapted to the client obtained after the edge computing end adjusts the first image; perform blur processing on the second image to obtain a third image; and send third image acquisition information for acquiring the third image to the client in response to the blur processing request message.
[0193] Furthermore, when the computer instruction is read and executed by the processor 801, the following steps are performed: obtaining a preprocessing request message for a first image sent by a cloud computing end; adjusting the first image to a second image adapted to a client, wherein the client is a client requesting the cloud computing end to perform blur processing on the first image; obtaining second image acquisition information for acquiring the second image; and sending the second image acquisition information to the cloud computing end in response to the preprocessing request message.
[0194] Embodiment 7 also provides a computer-readable storage medium for implementing the methods described in Embodiment 1 and Embodiment 2. The computer-readable storage medium embodiment provided in this application is described relatively simply, and the relevant parts can refer to the corresponding description of the above method embodiment. The embodiments described below are merely illustrative.
[0195] The computer-readable storage medium provided in this embodiment stores computer instructions, which can be applied to a user terminal. A large language model is deployed on the user terminal, and the weight parameters of each linear calculation layer of the large language model are pre-quantized into format data of an integer data type; when the instruction is executed by the processor, the following steps are implemented: receiving a blur processing request message for a first image sent by a client; sending a preprocessing request message for the first image to an edge computing end, requesting the edge computing end to adjust the first image to an image adapted to the client; obtaining a second image, which is an image adapted to the client obtained after the edge computing end adjusts the first image; blurring the second image to obtain a third image; and sending third image acquisition information for acquiring the third image to the client in response to the blur processing request message.
[0196] When the instruction is executed by the processor, the following steps are also implemented: obtaining a preprocessing request message for a first image sent by a cloud computing end; adjusting the first image to a second image adapted to a client, wherein the client is a client requesting the cloud computing end to perform blur processing on the first image; obtaining second image acquisition information for acquiring the second image; and sending the second image acquisition information to the cloud computing end in response to the preprocessing request message.
[0197] Embodiment 8 also provides a computer program product for implementing the methods described in Embodiment 1 and Embodiment 2. The computer program product embodiment provided in this application is described in a relatively simple manner. For the relevant parts, please refer to the corresponding description of the above method embodiment. The embodiments described below are merely illustrative.
[0198] The computer program product provided in this embodiment includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0199] Receive a blur processing request message for a first image sent by a client; send a preprocessing request message for the first image to an edge computing end, requesting the edge computing end to adjust the first image to an image adapted to the client; obtain a second image, which is an image adapted to the client obtained after the edge computing end adjusts the first image; perform blur processing on the second image to obtain a third image; and send third image acquisition information for acquiring the third image to the client in response to the blur processing request message.
[0200] and obtaining a pre-processing request message for the first image sent by the cloud computing end; adjusting the first image to a second image adapted to a client, the client being a client requesting the cloud computing end to perform blur processing on the first image;
[0201] Obtain second image acquisition information for acquiring the second image; and send the second image acquisition information to the cloud computing end in response to the preprocessing request message.
[0202] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0203] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0204] 1. Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include non-transitory media such as modulated data signals and carrier waves.
[0205] 2. Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0206] Although the present application is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.
Claims
1. An image processing method, characterized in that: include: receiving a blur processing request message for the first image sent by a client; Sending a preprocessing request message for the first image to the edge computing end, so as to request the edge computing end to adjust the first image to an image adapted to the client; Obtaining a second image, where the second image is an image adapted to the client obtained by the edge computing end adjusting the first image; Performing blur processing on the second image to obtain a third image; In response to the blur processing request message, third image acquisition information for acquiring the third image is sent to the client.
2. The image processing method according to claim 1, characterized in that: Also includes: Obtaining image rendering parameters of the client; The requesting the edge computing end to adjust the first image to an image adapted to the client includes: requesting the edge computing end to adjust the first image to an image adapted to the client according to an image rendering parameter of the client.
3. The image processing method according to claim 2, characterized in that: The obtaining of the image rendering parameters of the client includes: Obtaining screen resolution data of the client and the number of images displayed in each row on the screen of the client; According to the screen resolution data of the client and the number of images displayed in each row on the screen of the client, the image rendering width data of the client is obtained as the image rendering parameter of the client.
4. The image processing method according to claim 3, characterized in that: The blur processing request message carries the screen resolution data of the client and the number of images displayed in each row on the screen of the client; The obtaining of the screen resolution data of the client and the number of images displayed in each row on the screen of the client comprises: obtaining the screen resolution data of the client and the number of images displayed in each row on the screen of the client from the blur processing request message.
5. The image processing method according to any one of claims 2 to 4, characterized in that: Also includes: The image rendering parameters of the client are set in the preprocessing request message.
6. The image processing method according to claim 1, characterized in that: Also includes: Obtaining image identification information of the first image; acquiring the first image acquisition information according to a correspondence between the image identification information of the first image and the first image acquisition information used to acquire the first image; The first image acquisition information is set in the preprocessing request message.
7. The image processing method according to claim 1, characterized in that: Also includes: Obtaining second image acquisition information sent by the edge computing end for acquiring the second image; The obtaining of the second image includes: obtaining the second image according to the second image acquisition information.
8. The image processing method according to claim 1, characterized in that: The performing blur processing on the second image includes: performing Gaussian blur processing on the second image.
9. The image processing method according to claim 1, characterized in that: Also includes: storing the third image in the object storage end, and obtaining third image storage address information indicating a storage address of the third image in the object storage end; The third image acquisition information includes the third image storage address information.
10. The image processing method according to claim 1, characterized in that: Also includes: Obtaining position information of a main object in the second image sent by the edge computing end; The blurring the second image to obtain the third image includes: blurring the main object in the second image according to the position information of the main object in the second image to obtain the third image.
11. An image processing method, characterized in that: include: Obtaining a preprocessing request message for the first image sent by the cloud computing end; Adjusting the first image to a second image adapted to a client, where the client is a client that requests the cloud computing end to perform blur processing on the first image; obtaining second image acquisition information for acquiring the second image; In response to the preprocessing request message, the second image acquisition information is sent to the cloud computing end.
12. The image processing method according to claim 1, characterized in that: Also includes: Obtaining image rendering parameters of the client; The adjusting the first image to be adapted to the second image of the client includes: adjusting the first image to be adapted to the second image of the client according to an image rendering parameter of the client.
13. The image processing method according to claim 1, characterized in that: Also includes: Obtaining a blur processing request message for the first image sent by the client; Forwarding the obfuscation request message to the cloud computing end; The obtaining of the preprocessing request message for the first image sent by the cloud computing end includes: obtaining the preprocessing request message sent by the cloud computing end in response to the blur processing request message.
14. The image processing method according to claim 13, characterized in that: Also includes: Determining whether a third image obtained after blurring the first image is cached; The forwarding the blur processing request message to the cloud computing end includes: if the third image is not cached, forwarding the blur processing request message to the cloud computing end.
15. The image processing method according to claim 1, characterized in that: The preprocessing request message carries first image acquisition information for acquiring the first image; The method further includes: acquiring the first image according to information acquired from the first image.
16. The image processing method according to claim 1, characterized in that: Also includes: Detecting position information of a main object in the second image in the second image; In response to the pre-processing request message, the position information of the main object in the second image is sent to the cloud computing end to instruct the cloud computing end to perform blur processing on the main object in the second image.
17. An image processing system, comprising an edge computing end, a cloud computing end, and an object storage end, characterized in that: The edge computing end is used to obtain a pre-processing request message for the first image sent by the cloud computing end; adjusting the first image to a second image adapted to a client, where the client is a client that requests the cloud computing end to perform blur processing on the first image; obtaining second image acquisition information for acquiring the second image; In response to the preprocessing request message, sending the second image acquisition information to the cloud computing end; The cloud computing end is used to receive a blur processing request message for the first image sent by the client; Sending a preprocessing request message for the first image to the edge computing end, so as to request the edge computing end to adjust the first image to an image adapted to the client; Obtaining a second image, where the second image is an image adapted to the client obtained by the edge computing end adjusting the first image; Perform blur processing on the second image to obtain a third image; and send third image acquisition information for acquiring the third image to the client in response to the blur processing request message.
18. An electronic device, characterized in that: include: A processor, a memory, and computer program instructions stored on the memory and executable on the processor; When the processor executes the computer program instructions, the method according to any one of claims 1 to 16 is implemented.
19. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method described in any one of claims 1 to 16 when executed by a processor.
20. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 16 is implemented.
Citation Information
Patent Citations
Image display method, image processing device and computer readable storage medium
CN111833234A
Image processing method for sliding list, related device, equipment and medium
CN112488964A
Image processing method and device, equipment and medium
CN113393367A
Graphic image display system and method
CN117834946A
Video processing method and device, equipment and medium
CN118075546A