Image file generation method and apparatus, and image processing method and apparatus

By dividing the image into tiles and generating image files containing tile offsets, the problem of slow loading of massive image data in the cloud storage architecture is solved, efficient image browsing and data transmission are achieved, and the browsing experience and storage are improved. efficiency.

WO2024212707A1PCT designated stage expired Publication Date: 2024-10-17HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/078220
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-06-29
Filing Date
2024-02-23
Publication Date
2024-10-17

AI Technical Summary

Technical Problem

In the cloud storage architecture, the slow loading of massive image data leads to low image browsing efficiency, which is difficult to effectively solve with existing technology. Especially when users frequently perform panning and zooming operations, a large amount of original image data needs to be transmitted, resulting in image loading on the cloud. slow.

Method used

By dividing the image into tiles and generating an image file containing the tile offset, the terminal device can request the target tile without downloading the original image, download it in full, and use multi-level tiles and thumbnails to improve browsing experience, and reduce file input/output frequency by storing tile pyramids in files in a TIFF-compatible format.

Benefits of technology

It significantly alleviates the problem of slow image loading on the cloud, improves browsing efficiency, reduces the amount of data transmission, and saves storage space and transmission overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024078220_17102024_PF_FP_ABST
    Figure CN2024078220_17102024_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides an image file generation method and apparatus, and an image processing method and apparatus. The image file generation method comprises: receiving first image data, and segmenting the first image data to generate a plurality of tiles; and generating a first image file according to the plurality of tiles, wherein the first image file comprises: a first data structure area for storing a file header of the image file; a second data structure area for storing second image data, the second image data comprising a plurality of tiles; and a third data structure area for storing offsets of the plurality of tiles in the second image data. On the basis of said method, a terminal device can request tiles corresponding to a target image, and thus does not need to perform full download on original images, thereby mitigating the problem of slow loading of overcloud images, and improving the browsing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Image file generation method, image processing method and device

[0001] This application claims priority to the Chinese patent application with application number 202310391194.1 filed with the State Intellectual Property Office of China on April 12, 2023, and priority to the Chinese patent application with invention name “A file generation method, device and system”, as well as priority to the Chinese patent application with application number 202310786240.8 filed with the State Intellectual Property Office of China on June 29, 2023, and priority to the Chinese patent application with invention name “Image file generation method, image processing method and device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of image processing, and more specifically, to an image file generation method, an image processing method, and an image processing device. Background Art

[0003] Capturing objects with high-definition cameras is one of the most direct and effective ways to acquire data for future digital twin scenarios. Currently, various fields involve massive amounts of extremely large image data, characterized by multi-source heterogeneity, large volume, and complex types. To store this massive amount of image and raster data, cloud-based storage services are becoming an industry trend. Therefore, image and other raster data can be stored on cloud servers, and when browsing on the client side, images stored in the cloud can be transferred to the client side for browsing.

[0004] Summary of the Invention

[0005] The present application provides an image file generation method, an image processing method and an apparatus. The image file includes tiles segmented based on an original image and an offset indicating the tile position, so that a terminal device can request tiles corresponding to a target image without having to download the original image in full. This helps alleviate the problem of slow image loading on the cloud and improves browsing efficiency.

[0006] In a first aspect, a method for generating an image file is provided, comprising: acquiring data of a first image, the data of the first image including map data; dividing the first image to generate a plurality of tiles; generating a first image file based on the plurality of tiles, the first image file including: a first data structure area for storing a file header of the first image file, the file header being used to indicate a file type of the first image file; a second data structure area for storing data of a second image, the data of the second image including data of a plurality of tiles; and a third data structure area for storing offsets of the plurality of tiles, the offsets of the plurality of tiles being used to indicate storage locations of the data of the plurality of tiles in the second data structure area.

[0007] Based on the above embodiment, a method for generating an image file including the above data structure area is provided, so that only tiles corresponding to the target image can be requested, thereby eliminating the need to download the entire original image, which is beneficial to alleviating the problem of slow image loading on the cloud and thus improving browsing efficiency.

[0008] In conjunction with the first aspect, in certain implementations of the first aspect, the method further includes: resampling the plurality of tiles to generate a multi-level tile layer, wherein the second image includes the multi-level tile layer. Based on the above embodiment, providing the multi-level tile layer facilitates requesting tiles at different levels based on zooming, thereby improving the image browsing experience.

[0009] In combination with the first aspect, in certain implementations of the first aspect, for multiple homogeneous tiles among multiple tiles, the data of the second image in the second data structure area includes data of feature tiles among the multiple homogeneous tiles, and the multiple homogeneous tiles are multiple tiles whose pixel proportion that is the same as the feature tile reaches a predetermined threshold.

[0010] In conjunction with the first aspect, in certain implementations of the first aspect, the offsets corresponding to the multiple homogeneous tiles stored in the third data structure area are the same, and the same offsets of the multiple homogeneous tiles indicate the storage location of the feature tile in the second data structure area. Based on the above embodiment, tile reuse is achieved, thereby effectively saving storage space.

[0011] In conjunction with the first aspect, in certain implementations of the first aspect, the third data structure area is adjacent to the first data structure area in the first image file. Based on this embodiment, data reading efficiency is improved.

[0012] In conjunction with the first aspect, in certain implementations of the first aspect, the third data structure area includes a tag, wherein the tag includes an index code and an offset for each tile in the second image. Based on the above embodiment, it is convenient to search the third data structure area based on the code index to obtain the offset, and then locate the tile of the target image based on the offset, which is beneficial to improving search efficiency.

[0013] In combination with the first aspect, in certain implementations of the first aspect, the data of the second image also includes the first image and / or the first thumbnail, wherein the first thumbnail includes an image obtained by resampling based on the first image; the third data structure area also includes an offset corresponding to the first image and / or the first thumbnail.

[0014] Based on the above embodiment, setting the second image in the first image file to further include the original image can make the first image file more compatible with existing TIFF format files. Furthermore, setting the image data of the first image file to further include the first thumbnail facilitates image browsing and processing based on the first thumbnail. In addition, compared to storing the thumbnail or tile pyramid independently of the original image, storing all three in the image data of the first image file can also reduce file input / output frequency and improve read and write efficiency.

[0015] In conjunction with the first aspect, in certain implementations of the first aspect, the first thumbnail includes a multi-level thumbnail, where the multi-level thumbnail includes multiple images with different resolutions obtained by resampling the first image multiple times. Based on the above embodiment, providing a multi-level thumbnail facilitates requesting thumbnails at different levels based on zooming, thereby improving the image browsing experience.

[0016] In combination with the first aspect, in some implementations of the first aspect, the first image file further includes: a fourth data structure area, the fourth data structure area is used to store specific attributes of the multiple tiles, and the size of the specific attribute is greater than a certain threshold.

[0017] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes:

[0018] defining a projected coordinate system for the first image;

[0019] defining a coordinate reference hierarchy for the first image based on the projected coordinate system;

[0020] The first image is segmented according to a coordinate reference level to obtain a plurality of tiles.

[0021] In a second aspect, a method for image processing is provided, the method comprising: receiving a first data request from a terminal device, the first data request being used to request data of a first target image in a first image file, the first image file comprising a second data structure area, the second data structure area comprising data of a second image, the second image comprising a plurality of tiles, the plurality of tiles comprising an image obtained by segmentation based on the first image, wherein the first target image comprises one or more tiles in the second image; obtaining the data of the first target image in the first image file according to the first data request; and sending the data of the first target image to the terminal device.

[0022] Based on the above embodiment, the server receives the first data request sent by the terminal device, and then obtains one or more tiles included in the first target image according to the first data request, and sends it to the terminal device, so that there is no need to download the entire original image, which can significantly alleviate the problem of slow image loading on the cloud and improve browsing efficiency; and can also reduce the amount of data transmission.

[0023] In conjunction with the second aspect, in certain implementations of the second aspect, the second image includes multiple layers of tiles, the multiple layers of tiles including tiles at multiple different layers obtained by performing multiple resampling operations on the multiple tiles, and the first target image specifically includes one or more tiles at the same layer within the multiple layers of tiles. Based on the above embodiment, multiple tiles at a layer can be requested in a single request, which helps save transmission overhead.

[0024] In combination with the second aspect, in certain implementations of the second aspect, the first image file also includes a third data structure area, the third data structure area includes the offset of the data of multiple tiles in the second image, and the offset is used to indicate the storage location of the data of the multiple tiles in the second data structure area.

[0025] In combination with the second aspect, in certain implementations of the second aspect, for multiple homogeneous tiles among multiple tiles, the data of the second image in the second data structure area includes data of feature tiles among the multiple homogeneous tiles, and the multiple homogeneous tiles are multiple tiles whose pixel proportion that is the same as the feature tile reaches a predetermined threshold.

[0026] In conjunction with the second aspect, in certain implementations of the second aspect, the offsets corresponding to the multiple homogeneous tiles stored in the third data structure area are the same, and the same offsets of the multiple homogeneous tiles indicate the storage location of the feature tile in the second data structure area. Based on the above embodiment, by implementing tile reuse, storage space is effectively saved.

[0027] In combination with the second aspect, in certain implementations of the second aspect, obtaining data of the first target image in the first image file according to the first data request includes: determining the first target image according to the first data request; determining the first tile corresponding to the first target image according to the first target image; obtaining the first offset, the first offset being the offset of the first tile; obtaining the first tile according to the first offset, and sending the data of the first target image to the terminal device includes: sending the data of the first tile to the terminal device.

[0028] In combination with the second aspect, in certain implementations of the second aspect, the first data request includes a first offset, the first offset is the offset of the first tile corresponding to the first target image, and obtaining the data of the first target image in the first image file according to the first data request includes: obtaining the first tile according to the first offset, and sending the data of the first target image to the terminal device includes: sending the data of the first tile to the terminal device.

[0029] Based on the above scheme, the first target image can be requested by including the first offset in the first data request. The server does not need to search for the offset corresponding to the first target image in the third data structure area, and can directly determine the location of the required tile based on the first offset in the first data request, which is beneficial to improving reading efficiency; and in this scheme, data of multiple tiles can be requested through one data request, which can save transmission overhead and improve browsing efficiency.

[0030] In conjunction with the second aspect, in certain implementations of the second aspect, before receiving the first data request from the terminal device, the method further includes: receiving a second data request from the terminal device, the second data request being for a third data structure area of ​​the first image file; obtaining the third data structure area based on the second data request; and sending the third data structure area to the terminal device. Based on this solution, the terminal device can query the third data structure area for the corresponding first offset based on the set of index codes corresponding to tiles in the first target image.

[0031] In conjunction with the second aspect, in certain implementations of the second aspect, the first image file further includes a first data structure area, the first data structure area including a file header of the first image file, the file header being used to indicate the file type, and the third data structure area is adjacent to the first data structure area in the first image file. In this solution, the third data structure area can be read quickly after reading the first data structure area, thereby improving data reading efficiency.

[0032] In conjunction with the second aspect, in certain implementations of the second aspect, the third data structure area includes a tag, which includes an index code and an offset for each tile in the first tile. In this solution, the offset can be found in the third data structure area based on the code index, and the tile of the target image can be located based on the offset, which helps improve search efficiency.

[0033] In combination with the second aspect, in certain implementations of the second aspect, the second image also includes the first image and / or the first thumbnail, and the first thumbnail includes an image obtained by resampling based on the first image; the third data structure area also includes the offset corresponding to the data of the first image and / or the data of the first thumbnail.

[0034] Based on the above embodiment, setting the image data of the first image file to further include the original image can make the first image file more compatible with existing TIFF format files. Furthermore, setting the image data of the first image file to further include the first thumbnail facilitates image browsing and processing based on the first thumbnail. In addition, compared to storing the thumbnail or tile pyramid independently of the original image, storing all three in the image data of the first image file can also reduce file input / output frequency and improve read / write efficiency.

[0035] In combination with the second aspect, in some implementations of the second aspect, the first thumbnail includes a multi-level thumbnail, and the multi-level thumbnail includes a plurality of images with different resolutions obtained by performing multiple resampling operations on the first image.

[0036] In combination with the second aspect, in some implementations of the second aspect, the first image file further includes: a fourth data structure area, the fourth data structure area is used to store specific attributes of the multiple tiles, and the size of the specific attribute is greater than a certain threshold.

[0037] In a third aspect, a method for image processing is provided, comprising: sending a first data request to a server, the first data request being used to request data of a first target image in a first image file, the first image file comprising a second data structure area, the second data structure area comprising data of a second image, the second image comprising a plurality of tiles, the plurality of tiles comprising an image obtained by segmentation based on the first image, wherein the first target image comprises one or more tiles in the second image; receiving data of the first target image from the server; and presenting the first target image according to the data of the first target image.

[0038] Based on the above solution, the terminal device can request the first target image in the first image file in the server by sending a first data request to the server. The server then obtains one or more tiles included in the first target image according to the first data request and sends them to the terminal device, so that there is no need to download the original image in full, which can significantly alleviate the problem of slow image loading on the cloud and improve browsing efficiency; and can also reduce the amount of data transmission.

[0039] In combination with the third aspect, in certain implementations of the third aspect, the second image includes multi-level tiles, the multi-level tiles include multiple levels of tiles obtained by multiple resampling based on multiple tiles, and the first target image specifically includes one or more tiles of the same level in the multi-level tiles.

[0040] In combination with the third aspect, in certain implementations of the third aspect, the first image file also includes a third data structure area, which is used to store the offset of the data of the tiles in the second image, and the offset is used to indicate the storage position of the data of multiple tiles in the second data structure area.

[0041] In combination with the third aspect, in certain implementations of the third aspect, for multiple homogeneous tiles among multiple tiles, the data of the second image in the second data structure area includes data of feature tiles among the multiple homogeneous tiles, and the multiple homogeneous tiles are multiple tiles whose pixel proportion that is the same as the feature tile reaches a predetermined threshold.

[0042] In combination with the third aspect, in certain implementations of the third aspect, the offsets corresponding to the multiple homogeneous tiles stored in the third data structure area are the same, and the same offsets of the multiple homogeneous tiles indicate the storage position of the feature tile in the second data structure area.

[0043] In combination with the third aspect, in some implementations of the third aspect, the first data request includes a first offset, the first offset is an offset of a first tile, and the first tile includes one or more tiles corresponding to the first target image.

[0044] In combination with the third aspect, in certain implementations of the third aspect, before sending the first data request to the server, the method also includes: sending a second data request to the server, the second data request being used to request the third data structure area of ​​the first image file; receiving the third data structure area from the server; and determining the first offset based on the third data structure area.

[0045] In combination with the third aspect, in certain implementations of the third aspect, before sending the first data request to the server, the method also includes: obtaining an image access request, the image access request being used to request display of a first target image in the first image; and determining the first target image based on the image access request.

[0046] In combination with the third aspect, in certain implementations of the third aspect, determining the first target image includes: determining the level and pixel coordinates of the first target image based on the image access request; determining the first target image based on the level and pixel coordinates of the first target image.

[0047] In combination with the third aspect, in certain implementations of the third aspect, the third data structure area includes a label, the label includes the index code and offset of each tile in the second image, and determining the first offset based on the third data structure area includes: obtaining the index code of the tile of the first target image; searching in the third data structure area according to the index code of the tile of the first target image to determine the first offset.

[0048] In combination with the third aspect, in certain implementations of the third aspect, the first image file also includes a first data structure area, the first data structure area includes a file header of the first image file, the file header is used to indicate the file type, and the third data structure area is adjacent to the first data structure area in the first image file.

[0049] In combination with the third aspect, in certain implementations of the third aspect, the second image data in the second data structure area also includes data of the first image and / or data of the first thumbnail, and the first thumbnail includes an image obtained by resampling based on the first image data; the third data structure area also includes an offset corresponding to the data of the first image and / or the data of the first thumbnail.

[0050] In combination with the third aspect, in some implementations of the third aspect, the first thumbnail includes a multi-level thumbnail, and the multi-level thumbnail includes a plurality of images with different resolutions obtained by performing multiple resampling operations on the first image.

[0051] In a fourth aspect, an image file generation device is provided, which includes: a transceiver module for receiving data of a first image, the data of the first image including map data; a processing module for dividing the first image to generate multiple tiles; the processing module is also used to generate a first image file based on the multiple tiles, wherein the first image file includes: a first data structure area for storing a file header of the image file, the file header is used to indicate the file type; a second data structure area for storing data of a second image, the data of the second image including data of multiple tiles; a third data structure area for storing the offsets of multiple tiles in the second image data, the offsets of the multiple tiles are used to indicate the storage locations of the data of the multiple tiles in the second image data.

[0052] Based on the above embodiment, the image file generation device can generate an image file including the above data structure area, so that only the tiles corresponding to the target image can be requested, thereby eliminating the need to download the entire original image, which is conducive to alleviating the problem of slow image loading on the cloud, thereby helping to improve browsing efficiency.

[0053] In a fifth aspect, an image processing device is provided, characterized in that the device includes: a transceiver module for receiving a first data request from a terminal device, the first data request is used to request data of a first target image in a first image file, the first image file includes a second data structure area, the second data structure area includes data of a second image, the data of the second image includes data of multiple tiles, the multiple tiles include an image obtained by segmentation based on the first image, wherein the first target image includes one or more tiles in the second image; a processing module for obtaining data of the first target image in the first image file according to the first data request; the transceiver module is also used to send data of the first target image to the terminal device.

[0054] Based on the above scheme, the image processing device can receive a data request sent by the terminal device through the transceiver module. The processing module then obtains one or more tiles included in the first target image according to the first data request and sends it to the terminal device, so that there is no need to download the original image in full, which can significantly alleviate the problem of slow image loading on the cloud and improve browsing efficiency; and can also reduce the amount of data transmission.

[0055] In a sixth aspect, a device for image processing is provided, characterized in that the device includes: a transceiver module for sending a first data request to a server, the first data request is used to request data of a first target image in a first image file, the first image file includes a second data structure area, the second data structure area includes data of a second image, the second image includes multiple tiles, the multiple tiles include an image obtained by segmentation based on the first image data, wherein the first target image includes one or more tiles in the second image; the transceiver module is also used to receive data of the first target image from the server; the processing module is used to present the first target image based on the data of the first target image.

[0056] Based on the above scheme, the image processing device can send a first data request to the server through the transceiver module, so that it can request the first target image in the first image file in the server. The server then obtains one or more tiles included in the first target image according to the first data request, so that there is no need to download the original image in full. After the transceiver module receives the data of the first target image from the server, the processing module presents the first target image according to the data of the first target image, which can significantly alleviate the problem of slow image loading on the cloud and improve browsing efficiency; and can also reduce the amount of data transmission.

[0057] In the seventh aspect, a first image file is provided, which includes a first data structure area for storing a file header of the first image file, where the file header is used to indicate the file type of the first image file; a second data structure area for storing data of a second image, where the data of the second image includes data of multiple tiles; the multiple tiles include an image obtained by segmenting based on the first image; and a third data structure area for storing offsets of multiple tiles, where the offsets of the multiple tiles are used to indicate the storage locations of the data of the multiple tiles in the second data structure area.

[0058] In an eighth aspect, a computing device is provided, comprising a processor and a memory, wherein the processor is configured to execute instructions stored in the memory so that the computing device executes a method as described in any one of the first aspect, the second aspect, or the third aspect.

[0059] In a ninth aspect, a computing device cluster is provided, comprising at least one computing device, each computing device comprising a processor and a memory; the processor of at least one computing device is used to execute instructions stored in the memory of at least one computing device, so that the computing device cluster performs a method as described in any one of the first aspect, the second aspect, or the third aspect.

[0060] In a tenth aspect, a computer-readable storage medium is provided, comprising computer program instructions. When the computer instructions are executed by a computing device cluster, the computing device cluster executes a method as in any one of the first aspect, the second aspect, or the third aspect.

[0061] In the eleventh aspect, a computer program product containing instructions is provided, characterized in that when the instructions are executed by a computing device cluster, the computing device cluster executes the method as described in any one of the first aspect, the second aspect, or the third aspect.

[0062] In the twelfth aspect, a cloud-side device is provided, comprising at least one processor, the at least one processor being coupled to at least one memory, the at least one processor being used to execute a computer program or instruction stored in the at least one memory, so that the cloud-side device executes a method as in the first aspect or any one of the second aspects.

[0063] In the thirteenth aspect, an end-side device is provided, comprising at least one processor, the at least one processor being coupled to at least one memory, the at least one processor being used to execute a computer program or instruction stored in the at least one memory, so that the end-side device executes any one of the methods in the third aspect.

[0064] In the fourteenth aspect, a terminal-cloud collaborative system is provided, comprising a cloud-side device as in the twelfth aspect and an terminal-side device as in the thirteenth aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] FIG1 is a schematic diagram of a terminal-cloud collaboration system provided in an embodiment of the present application.

[0066] FIG2 is a schematic diagram of an image processing method provided in an embodiment of the present application.

[0067] FIG3 is a schematic diagram of an image file generation method provided in an embodiment of the present application.

[0068] FIG4 is a TIFF image provided in an embodiment of the present application.

[0069] FIG5 is a schematic diagram of the file structure of a TIFF image file provided in an embodiment of the present application.

[0070] FIG6 is a schematic diagram of coordinate mapping of a TIFF image provided by an embodiment of the present application.

[0071] FIG7 is a schematic diagram of an image resampling and segmentation process provided in an embodiment of the present application.

[0072] FIG8 is a schematic diagram of the file structure of a first image file provided in an embodiment of the present application.

[0073] FIG9 is a schematic diagram of a process for determining tiles of a first target image provided by an embodiment of the present application.

[0074] FIG10 is a schematic block diagram of an image file generating device provided in an embodiment of the present application.

[0075] FIG11 is a schematic block diagram of an image processing device provided in an embodiment of the present application.

[0076] FIG12 is a schematic structural block diagram of a computing device provided in an embodiment of the present application.

[0077] FIG13 is a schematic structural block diagram of a computing device cluster provided in an embodiment of the present application.

[0078] FIG14 is a schematic structural block diagram of another computing device cluster provided in an embodiment of the present application. DETAILED DESCRIPTION

[0079] The technical solution in this application will be described below with reference to the accompanying drawings.

[0080] The end-side device in the embodiments of the present invention may also be referred to as a terminal device, user equipment (UE), mobile station (MS), or mobile terminal. The end-side device may be, for example, a mobile phone (or "cellular" phone) or a computer with a mobile terminal, for example, a portable, pocket-sized, handheld, computer-built-in, or vehicle-mounted mobile device.

[0081] The cloud-side device in the embodiment of the present invention may be a server or a server cluster. The cloud-side device may also be referred to as a computing node or a cloud-side computing cluster.

[0082] In order to facilitate understanding and description of the image processing method provided by the embodiment of the present invention, the end-cloud collaborative system 100 provided by the embodiment of the present application is described below with reference to FIG1 .

[0083] As shown in Figure 1, the end-cloud collaboration system 100 includes an end-side device 110 and a cloud-side device 120. The end-side device 110 includes an image processing system 111 and application programs 112 (APP1, APP2, ..., APPN). The image processing system 111 includes a transceiver module and a processing module; the transceiver module is used to send image data requests or receive image data. The cloud-side device 120 includes a cloud storage module, a transceiver module, and a processing module. The cloud storage module is used to store image data.

[0084] The following is an introduction to the relevant terms involved in the embodiments of this application.

[0085] 1. Raster image: Also known as a bitmap image or dot matrix image, it refers to an image whose smallest unit is composed of pixels. It is usually obtained by photography, scanning, or filming. File formats include BMP, GIF, JPG, TIFF, etc. It is widely used in various fields such as satellite remote sensing, astronomical observation, biomedicine, and land management.

[0086] 2. Tile: This refers to dividing an image into several small images evenly and seamlessly according to a fixed size (such as 256*256). The process of dividing an image into tiles is called image slicing.

[0087] 3. Tile Pyramid: Tiles of different levels form a tile pyramid, also known as an image pyramid. In this application, it is also referred to as a multi-level tile. It is a model with multiple resolution levels. Each tile is identified by a "layer number, row number, and column number." The layer refers to the level of resolution. The higher the number of layers, the higher the image resolution of the tile, and the clearer the tile.

[0088] 4. Thumbnail: refers to a small image that is proportionally resampled from a large image. Except for the different file sizes, the thumbnail and the original image maintain similar visual effects. Usually, there can be thumbnails of multiple resolutions depending on the degree of scaling.

[0089] 5. Homogeneous areas: Areas with consistent large-scale color patterns are called homogeneous areas, such as large geographical snow-capped mountains, deserts, ocean areas, etc.

[0090] The above briefly explains the terms involved in this application, which will not be repeated in the following embodiments. In addition, the above explanation of the terms is only for the purpose of facilitating understanding and does not limit the scope of protection of the embodiments of this application.

[0091] In current cloud architectures, most information systems use a browser / server (B / S) architecture. In this B / S architecture, the display of cloud images on the client side primarily relies on web transmission technology. Specifically, the image to be displayed on the cloud is transmitted to the client side via the web, and the client side then renders a portion of the image based on the screen size. However, when faced with large amounts of image data and users frequently perform operations such as panning and zooming, the client side sends a large number of requests, each of which requires the transmission of the original image. This results in extremely slow loading of cloud images, making efficient browsing of large cloud images difficult.

[0092] In view of this, the present application proposes a solution that can alleviate the problem that images on the cloud are difficult to browse efficiently on the terminal side.

[0093] FIG2 shows a schematic diagram of an image processing method 200 provided in an embodiment of the present application. The method can be applied to the end-cloud collaborative system shown in FIG1 , but the embodiment of the present application is not limited thereto.

[0094] The method comprises the following steps:

[0095] S210, the terminal device sends a first data request to the server;

[0096] The terminal device may send a first data request to the server, wherein the first data request may be used to request data of a first target image in a first image file.

[0097] Among them, the first target image can be an image that the terminal device needs to browse. Among them, the first image file can include a second data structure area, and the second data structure area can be used to store the data of the second image, and the second image can include a plurality of tiles obtained by segmenting based on the first image. In an embodiment of the present application, the first target image can include one or more tiles in the second image. It can be understood that the first image can be an original image, and the first image hereinafter can also be referred to as the original image, which is not limited here. For example, the data of the first image can include map data.

[0098] In some embodiments, the second image in the second data structure area may include multiple layers of tiles, wherein the multiple layers of tiles may specifically include multiple layers of tiles obtained by multiple resamplings of the multiple tiles. Based on the above embodiment, providing multiple layers of tiles facilitates requesting tiles of different layers based on zooming, thereby improving the image browsing experience.

[0099] In some embodiments, the first image file may further include a third data structure area, which may be used to store the offset of the data of the plurality of tiles in the second image, wherein the offset is used to indicate the storage location of the data of the plurality of tiles in the second data structure area.

[0100] In some implementations, the first image file may further include a first data structure area, and the first data structure area may be used to store a file header of the first image file, wherein the file header is used to identify or indicate a file type.

[0101] Optionally, the first data request may be an HTTP range (GET Range) request.

[0102] Correspondingly, the server may receive a first data request from the terminal device. Optionally, the first image file may be stored in the server. After receiving the first data request from the terminal device, the server may obtain data of the first target image from the first image file according to the first data request.

[0103] Optionally, before receiving the first data request from the terminal device, the server may generate a first image file. The present application provides an image file generation method 300, as shown in FIG3 , which includes:

[0104] S310, acquiring data of a first image;

[0105] S320, dividing the first image into multiple tiles;

[0106] S330: Generate a first image file according to the multiple tiles.

[0107] Specifically, the first image file may include:

[0108] A first data structure area, the first data structure area is used to store the file header of the image file;

[0109] The file header may identify or indicate the file type. In some embodiments, the file header of the image file may be the same as the file header of the original image, so that the image file is compatible with the original image format. Alternatively, the file header of the original image may be directly extracted as the file header of the image file.

[0110] A second data structure area, the second data structure area is used to store data of a second image, the data of the second image includes data of a plurality of tiles;

[0111] The third data structure area can be used to store the offset of the data of multiple tiles in the second image.

[0112] Based on the embodiment of the above-mentioned image file generation method, an image file including the above-mentioned data structure area is provided, so that only the tiles corresponding to the target image can be requested, thereby eliminating the need to download the entire original image, which is conducive to alleviating the problem of slow image loading on the cloud, thereby helping to improve browsing efficiency.

[0113] In some embodiments, the second image may include multiple layers of tiles. In this case, in step S330, a projected coordinate system may be first defined for the original image, and then a coordinate reference hierarchy may be defined based on the projected coordinate system. Furthermore, the original image may be segmented and resampled according to the coordinate reference hierarchy to obtain multiple layers of tiles. Specifically, the multiple layers of tiles obtained by segmenting the original image may be resampled multiple times according to the coordinate reference hierarchy to obtain the multiple layers of tiles.

[0114] In some embodiments, the first image file may further include a fourth data structure area, wherein the fourth data structure area may be used to store a specific attribute of the second image. Optionally, the size of the specific attribute is greater than a certain threshold.

[0115] In a specific embodiment of the present application, the first data structure area may be described as a "file header," the second data structure area may be described as "image data," the third data structure area may be described as an "image attribute directory," and the fourth image attribute may be described as an "attribute value." These descriptions are omitted. It should be understood that the following examples are merely provided for ease of description and understanding and do not constitute any limitation on the technical solution.

[0116] The above-mentioned image file generation method is introduced below in conjunction with specific embodiments.

[0117] Exemplarily, the format of the first image file can be named RM-TIFF format. In some embodiments, the format of the original image can be Tagged Image File Format (TIFF). Exemplarily, the suffix of the original image file can include tif, tiff, TIF, TIFF, etc. TIFF format image files generally include a file header (Image File Header, IFH), image data, an image attribute directory (Image File Directory, IFD) and attribute values. It should be noted that a TIFF file can store multiple images, that is, there can be one or more image data, and the image data and IFD appear in pairs. In other words, each image data corresponds to one or more corresponding IFDs.

[0118] To facilitate understanding of the present embodiment, FIG4 provides a TIFF image from the present embodiment. The TIFF image, when opened, appears as shown in FIG4 . The TIFF image has a width of 750 pixels and a height of 1000 pixels. FIG5 shows a schematic diagram of the file structure of the image file for the TIFF image in FIG4 . As shown in FIG5 , the image file for the TIFF format image includes an IFH, image data, an IFD, and attribute values. Since the image in this embodiment is not large, it only contains the image data, and an IFD is used to record the attributes within the image.

[0119] TIFF image files typically begin with an 8-byte IFH. The IFH can include a sequence flag, a TIFF flag, and the offset of the first IFD. The sequence flag occupies 2 bytes; the TIFF flag occupies 2 bytes; and the offset of the first IFD occupies 4 bytes. The offset of the first IFD indicates the location of the first IFD corresponding to the first image data.

[0120] An IFD records image attributes. Specifically, an IFD includes the tag number, tags, and the offset to the next IFD. The tag number occupies 2 bytes and records the total number of tags that follow. Each tag occupies 12 bytes and represents a specific image attribute. This is further divided into the tag number (2 bytes), value type (2 bytes), number of values ​​(4 bytes), and data or offset (4 bytes). If the byte length of the value type multiplied by the number of values ​​is less than or equal to 4 bytes, the data can be stored directly within the tag. Otherwise, the data can be stored in the attribute value at the end of the TIFF format, and the offset can be recorded in the tag. At the end of the IFD, there is also the offset to the next IFD. If there is no next IFD, this value can be NULL (0x00000000). Tags in an IFD are numbered in ascending order, as defined in the TIFF specification. For example, tag number 256 represents the image width, and tag number 282 represents the offset to the stripe data. A stripe divides continuous data into blocks, each stored in a different location. In the image file shown in FIG5 , tag 3 points to the location in the TIFF file where the image data of the TIFF image is located.

[0121] In some embodiments, the format of the original image can also be Geo Tag Image File Format (GeoTIFF). GeoTIFF is an extended format of Tagged Image File Format (TIFF), that is, it defines some geographic tags (Geo Tags) based on TIFF to define and store various coordinate systems, ellipsoid references, projection information, etc., so that image data and geographic data are stored in the same image file, thereby facilitating the production and use of images with geographic information. For example, geographic information can be information such as coordinate system, longitude and latitude. Processing images based on GeoTIFF format defines a standard coordinate system for the image, which is conducive to subsequent format conversion.

[0122] Specifically, in step S310, the file header IFH of the original image can be first extracted as the file header of the first image file. Optionally, the format of the original image can be verified to see if it is in the correct TIFF or GeoTIFF format. Exemplarily, a third-party library, such as libtiff, can be used to verify whether the image is in the correct TIFF format. Exemplarily, a third-party library, such as GDAL or OpenCV, can be used to verify whether the image is in the GeoTIFF format.

[0123] In some embodiments, the original image may be resampled to obtain a first thumbnail. The first thumbnail may include multiple levels of thumbnails, each of which includes multiple images with different resolutions obtained by resampling the original image multiple times. Multiple levels of thumbnails may also be generated based on the aforementioned coordinate reference level.

[0124] In an embodiment of the present application, when the second data structure area in the first image file is generated in step S330, the first thumbnail and / or the original image can also be stored in the second data structure area. Based on the above embodiment, storing the original image in the second data structure area of ​​the first image file can make the first image file more compatible with existing TIFF format files. Storing the first thumbnail in the second data structure area of ​​the first image file can facilitate image browsing and processing based on the first thumbnail. Compared with storing the thumbnail or tile pyramid independently of the original image, storing all three in the second data structure area of ​​the first image file is conducive to reducing the file input / output (I / O) frequency and improving read and write efficiency.

[0125] Optionally, in step S330, the offset of the data of the first thumbnail and / or the original image in the second data structure area may also be stored in the third data structure area. Furthermore, the image attributes in the IFD of the original image may also be stored in the third data structure area.

[0126] In some embodiments, the image attributes in the IFD of the original image can be extracted and stored in memory. For example, the original image can be the TIFF image shown in FIG4 , and the image attributes in the IFD of the original image can be the image width, image height, stripe offset, etc. of the original image shown in FIG5 .

[0127] In some embodiments, a data structure, such as a Map structure, can be used to temporarily store the extracted IFH, IFD, and image data of the original image for subsequent use. In other embodiments, the extracted IFH, IFD, and image data of the original image can be directly stored in a file for persistent use.

[0128] The following describes the definition of the projection coordinate system and the coordinate reference level in step S330 , and the segmentation and resampling based on the original image in combination with the coordinate reference level, in conjunction with specific embodiments.

[0129] (1) Define the projected coordinate system

[0130] Specifically, when the format of the original image is TIFF format, the original image in TIFF format may be converted into GeoTIFF format first.

[0131] GeoTIFF format image files contain geographic data, and a geographic coordinate system is defined based on this geographic data. It can be understood that the geographic coordinate system is a spherical coordinate system in space, while the projected coordinate system is a plane coordinate system. The process of converting spherical coordinates into plane coordinates is called projection.

[0132] In some embodiments, an image in GeoTIFF format is defined with a geographic coordinate system and a projection coordinate system, that is, each pixel in GeoTIFF format may correspond to a geographic coordinate and a projection coordinate.

[0133] In other implementations, the image in GeoTIFF format only defines a geographic coordinate system, and a projection coordinate system needs to be defined based on the geographic coordinate system.

[0134] In the embodiment of the present application, defining a projection coordinate system can be understood as converting the coordinates of a spherical surface into the coordinates of a plane. For example, the projection coordinate system can be defined by the DefineProjection_management method of the arcpy script. It should be noted that defining a projection coordinate system does not change the geometric information of the image, but only updates the coordinate system, so it does not cause deformation to the display of the image. For example, the projection coordinate system can be defined as a spherical Mercator coordinate system (also known as a "Web Mercator coordinate system"), and can be projected based on the projection standard of EPSG:3857.

[0135] In some implementations, the pixel coordinates of the original image may be directly mapped to projection coordinates. Specifically, the width and height of the TIFF image may be mapped to coordinates on a two-dimensional plane coordinate system as the projection coordinates of the image.

[0136] For example, Figure 6 is a schematic diagram of the coordinate mapping of the TIFF image shown in Figure 4. Given that the resolution of the TIFF image shown in Figure 4 is 750*1000, the lower left corner of the TIFF image can be set as the origin of the projected coordinate system (0,0). The coordinates of the upper right corner of the TIFF image are then (750,1000). Figure 6 shows the projected coordinates of the TIFF image after mapping.

[0137] (2) Define the coordinate reference level

[0138] In some embodiments, a coordinate reference level can be defined based on the projected coordinate system of the original image to facilitate the generation of multi-level thumbnails and multi-level tiles, wherein the coordinate reference level corresponds to the level in the multi-level thumbnails and multi-level tiles. Generally, the maximum zoom level resolution during image browsing does not exceed the original resolution of the image, and the resolutions of adjacent levels are doubled.

[0139] For example, assuming that the length and width of a tile are both 256 pixels, the tile pyramid can use 1*1 tiles to represent the image at level 0, 2*2 tiles to represent the image at level 1, 4*4 tiles to represent the image at level 2, and so on. The tile level correspondence shown in Table 1 is obtained:

[0140] Table 1 Tile level correspondence of an embodiment of the present application

[0141] According to Table 1, the 18th level of the pyramid can represent images with a maximum pixel size of 67,108,864*67,108,864. Images exceeding this range can be further divided. For the original TIFF image shown in Figure 4, the image size is 750*1000, so it can be represented by the second level of the tile pyramid, which has a pixel size of 1024*1024. This image is located in the second level of the pyramid and covers 12 tiles.

[0142] Based on the defined coordinate reference hierarchy, the original image can be segmented and resampled to obtain multi-level tiles. Alternatively, the original image can be resampled to obtain multi-level thumbnails. Segmentation is also known as cropping. For example, segmentation and resampling can be performed using third-party libraries such as GDAL and OpenCV.

[0143] (3) Segmentation and resampling based on the original image

[0144] The following describes the resampling and segmentation process in conjunction with a specific embodiment. Figure 7 is a schematic diagram of a resampling and segmentation process provided in an embodiment of the present application. The original image in this resampling and segmentation process is the TIFF image in Figure 4. For example, in this embodiment, the tile length and width are both 256 pixels.

[0145] As shown in Figure 7, the multi-level tile acquisition process is as follows: the original image with a resolution of 750*1000 is segmented to obtain 12 second-layer tiles; the 12 second-layer tiles are resampled to obtain 4 first-layer tiles. For example, the four second-layer tiles marked as ①, ②, ③, and ④ in the figure are resampled to obtain one first-layer tile marked as ⑤ in the figure; the four first-layer tiles are resampled to obtain one zero-layer tile.

[0146] The multi-level thumbnail acquisition process is as follows: the original image with a resolution of 750*1000 is directly used as the second-level thumbnail; the second-level thumbnail is resampled to obtain a first-level thumbnail with a resolution of 375*500; the first-level thumbnail is resampled to obtain a zero-level thumbnail.

[0147] Specifically, in step S330, the obtained multi-level thumbnails and multi-level tiles can be uniformly encoded, and the index code and offset of each image can be stored in the third data structure area accordingly. Exemplarily, the geohash method can be used for encoding, or other encoding methods, such as custom encoding methods, can be used, which is not limited in this application. For example, in the embodiment shown in Figure 7, the geohash method can be used to encode the tiles in a zigzag order, and the index codes of the tiles numbered ①, ②, ③, and ④ in the second layer of tiles are 0000, 0001, 0010, and 0011 respectively; the index code of the tile numbered ⑤ in the first layer of tiles is 00. Based on the above embodiment, it is convenient to determine the offset according to the encoding index, so as to locate the tile of the target image according to the offset.

[0148] In some embodiments, the index code and offset of the thumbnail can be stored in a tag in the third data structure area. When the number of thumbnails is relatively large, the thumbnail code and offset can also be stored in multiple tags in the third data structure area. Similarly, the tile code and offset can also be stored in one or more tags in the third data structure area. For example, in the embodiment of the present application, the offsets of the thumbnails of layers 0-2 are uniformly stored in a single tag.

[0149] In summary, the first image file can be generated based on the original image.

[0150] Figure 8 shows a schematic diagram of the file structure of a first image file according to one embodiment of the present application. Referring to Figure 8 , the first image file includes an IFH, an IFD, attribute values, and image data. In the IFD, tags 1 through n contain attribute information of the original image, such as image width, image height, and stripe offset; tags n+1 through m contain coordinate information; and tags m+1 through k contain offsets to the original image. Subsequent tags are used to store offsets for thumbnails and tiles.

[0151] In some embodiments, region detection can be performed on the tiles in the first image file to determine homogeneous tiles, wherein homogeneous tiles are tiles whose proportion of the same pixels as the feature tiles reaches a predetermined threshold. Exemplarily, homogeneous region detection can be performed using methods such as deep learning and histogram analysis. Specifically, similarity detection can be performed on the tiles, and tiles with consistent large-scale color patterns belong to homogeneous regions. In the similarity detection, a parameter λ can be set so that when the proportion of the same or similar pixels in two tiles exceeds λ, the two tiles are considered to be homogeneous tiles. Specifically, the parameter λ can be set according to the actual needs of the application.

[0152] For multiple homogeneous tiles, the tile that best represents the area can be extracted as a feature tile. Exemplarily, the feature tiles can be extracted by manual selection or machine learning. In the image data of the first image file, only the data of the feature tiles among the multiple homogeneous tiles can be included, that is, the data of the homogeneous tiles other than the feature tiles can be deleted; and the offsets corresponding to the multiple homogeneous tiles in the IFD are all set to the offset of the feature tile, that is, the offsets of the multiple homogeneous tiles all indicate the position of the feature tile in the first image file. Based on the above embodiment, by being able to realize the reuse of tiles, storage space is effectively saved.

[0153] In some embodiments, the image data in the first image file can be compressed to reduce storage space and network transmission costs. After compression, the offset in the IFD needs to be updated synchronously. Exemplary compression methods include LZM, JPEG, and DEFLATE.

[0154] In some embodiments, the third data structure area can be positioned adjacent to the first data structure area. Specifically, the IFD can be positioned adjacent to the IFH in the first image file. This embodiment improves data reading efficiency. In some embodiments, the attribute value can also be positioned adjacent to the IFD after the file header to facilitate a single read of all image attributes.

[0155] Based on the above embodiment, the first image file in the RM-TIFF format can be obtained by performing format conversion on the original image.

[0156] S220: The server obtains data of the first target image from the first image file according to the first data request.

[0157] After receiving the first data request in S210 , the server may obtain data of the first target image from the first image file according to the first data request.

[0158] S230: The server sends the data of the first target image to the terminal device.

[0159] Correspondingly, the terminal device may receive the data of the first target image from the server, and present the first target image according to the data of the first target image.

[0160] Based on the above embodiment, the terminal device can request the first target image in the first image file in the server by sending a first data request to the server. The server then obtains one or more tiles included in the first target image according to the first data request and sends it to the terminal device, so that there is no need to download the entire original image, which can significantly alleviate the problem of slow image loading on the cloud and improve browsing efficiency; and can also reduce the amount of data transmission.

[0161] Before the above S210, the terminal device may also first determine the first target image. Specifically, the terminal device may first obtain an image access request. For example, the image access request may be a user performing an operation such as panning or zooming, and the image access request is used to request display of the first target image in the original image.

[0162] In some embodiments, the terminal device may determine the first target image based on the image access request. Specifically, the terminal device may determine the level and pixel coordinates of the first target image based on the image access request, and then determine the first target image and the tile corresponding to the first image based on the level and pixel coordinates of the first target image.

[0163] For example, the level of the tiles within the window range can be determined based on the user's panning, zooming, and other operations, and the screen coordinates can be converted into pixel coordinates. The pixel coordinates are then converted into projection coordinates to obtain the projection coordinate range of the tiles within the window range. Based on the projection coordinate range of the tiles, a set of index codes corresponding to the tiles can be obtained. It should be noted that the window on the terminal device side and the image on the server side both use the same encoding method, for example, both use the geohash method for encoding, so that the index codes of the window on the terminal device side and the corresponding server-side tiles are unified.

[0164] In some embodiments, the first data request may include geographic information corresponding to the first target image, such as a longitude and latitude range. After receiving the first data request, the server may retrieve data for the first target image from the first image file based on the first data request. Specifically, the server may determine the first target image based on the first data request; then, based on the first target image, determine a first tile corresponding to the first target image, where the first tile may include one or more tiles; then, retrieve a first offset corresponding to the first tile; then, retrieve data for the first tile based on the first offset, and transmit the data for the first tile to the terminal device.

[0165] In some embodiments, before step S210, the terminal device may also send a second data request to the server to request the third data structure area of ​​the first image file. Optionally, the second data request may be an HTTP GET Range request. Accordingly, the server may receive the second data request from the terminal device, retrieve the third data structure area from the first image file based on the second data request, and then send the third data structure area of ​​the first image file to the terminal device.

[0166] Furthermore, the terminal device can query the corresponding first offset in the third data structure area based on the set of index codes corresponding to the tiles in the first target image. It can be understood that the first offset is a set of offsets corresponding to one or more tiles in the first tile. When the first target image covers only one tile, there is one index code and one corresponding offset, which constitutes the above-mentioned first offset; when the first target image covers multiple tiles, there are multiple index codes and multiple corresponding offsets, which constitute the above-mentioned first offset.

[0167] Furthermore, the first data request can include a first offset, so that the server can directly locate the data location of the first target image based on the first offset. Based on the above solution, the first target image can be requested by including the first offset in the first data request. The server does not need to search the third data structure area for the offset corresponding to the first target image and can directly determine the location of the required tile based on the first offset in the first data request, thereby improving reading efficiency. In addition, this solution can request data for multiple tiles through a single data request, saving transmission overhead and improving browsing efficiency.

[0168] The following describes a process of determining a set of index codes corresponding to tiles in the first target image with reference to specific embodiments.

[0169] FIG9 is a schematic diagram of the process of determining the tiles of the first target image provided in an embodiment of the present application. Assuming that the image display area (or referred to as a "window") is 300*300 pixels, the zoom level is at level 0 when the user initially loads the image, and then the user changes the zoom level to level 2 through translation and zooming operations, and the pixel coordinates corresponding to the upper left corner of the image window are (200, 200). Referring to FIG9 , the window is at the second zoom level, and the pixel coordinates corresponding to the upper left corner of the window are (200, 200). At this time, the screen cannot display the entire image, so tiles within the window range are requested.

[0170] In this embodiment, the index coding determination process of the tile of the first target image is as follows:

[0171] (1) The screen coordinates can be converted to pixel coordinates. Based on the window size of 300*300 and the pixel coordinates of the upper left corner (200,200), the pixel coordinates of the lower right corner of the window can be calculated to be (500,500); (2) According to the projection coordinate system of the image, the pixel coordinates are converted to standard projection coordinates. The origin of the pixel coordinates is located in the upper left corner, and the y-axis increases from top to bottom, while the origin of the projection coordinates is located in the lower left corner, and the y-axis increases from bottom to top, so a coordinate system conversion is required. Aligning the coordinates of the upper left corner of the projection coordinate system in the figure with the origin of the pixel coordinate system, the projection coordinate range within the window range is [200,500] on the x-axis and [524,824] on the y-axis; (3) According to the geohash encoding method, the projection coordinate range is converted to an index encoding set, that is, four tiles 0100, 0101, 0110, and 0111.

[0172] In some embodiments, the first target image may include a thumbnail. For example, when the user's image display area (or "window") is initially in layer 0, the upper left corner of the screen coordinates is (0,0) and the lower right corner is (300,300). The image thumbnail size of layer 0 is 256*256 pixels, so the full image can be displayed directly through the thumbnail. Optionally, the terminal device can retrieve the second offset corresponding to the thumbnail in the IFD, and accordingly, the first data request includes the second offset. The server can determine the position of the thumbnail based on the second offset in the first data request and send the thumbnail data to the terminal device.

[0173] In some implementations, the terminal device may cache the received data of the first target image. Alternatively, a memory cache may be used; when the cache requirement is high, a database cache may be used. Subsequent requests for the same image may prioritize searches in the local cache to improve efficiency.

[0174] The method-side embodiment of the present application is described in detail above in conjunction with Figures 1 to 9 . The device-side embodiment of the present application will be described in detail below in conjunction with Figures 10 to 12 . It should be understood that the description of the device embodiment corresponds to the description of the method embodiment. Therefore, for portions not described in detail, reference can be made to the above method embodiment.

[0175] Figure 10 is a schematic block diagram of an image file generation device 1000 provided in an embodiment of the present application. As shown in Figure 10 , the image file generation device 1000 may include a transceiver module 1010 and a processing module 1020. In one possible design, the image file generation device 1000 may implement the steps or processes corresponding to those performed by the image file generation method in the above method embodiment.

[0176] Optionally, the image file generating device 1000 can be applied to a server. In some embodiments, the transceiver module 1010 can be used to receive data of a first image. The data of the first image can include map data; the processing module 1020 can be used to segment the first image to generate multiple tiles; the processing module 1020 can also be used to generate a first image file based on the multiple tiles, wherein the first image file includes: a first data structure area for storing a file header of the image file, the file header is used to indicate the file type; a second data structure area for storing data of a second image, the data of the second image includes data of multiple tiles; a third data structure area for storing the offsets of multiple tiles in the second image data, the offsets of the multiple tiles are used to indicate the storage location of the data of the multiple tiles in the second image data.

[0177] Based on the image file generated by the above-mentioned image file generation device 1000 and including the above-mentioned data structure area, the terminal device can only request the tiles corresponding to the target image in the image file, thereby eliminating the need to download the entire original image, which is conducive to alleviating the problem of slow image loading on the cloud and improving browsing efficiency.

[0178] In some embodiments, the processing module 1020 may be further configured to resample the plurality of tiles to generate multi-level tiles, and the second image may include the multi-level tiles.

[0179] In some embodiments, for multiple homogeneous tiles in the first tile, the second data structure area can only store the data of the feature tile in the multiple homogeneous tiles, and the offsets corresponding to the multiple homogeneous tiles in the third data structure area can be set to be the same, and the same offsets corresponding to the multiple homogeneous tiles can point to the position of the data of the feature tile in the second data structure area.

[0180] Optionally, the third data structure area may be arranged adjacent to the first data structure area. In some embodiments, the third data structure area may include a tag, and the tag may include an index code and an offset of each tile in the first tile.

[0181] In some embodiments, the second data structure area may also store data of the original image and / or data of the first thumbnail, where the first thumbnail includes an image resampled from the original image. Furthermore, the third data structure area may also store offsets corresponding to the data of the original image and / or the data of the first thumbnail.

[0182] Furthermore, the first thumbnail may include a multi-level thumbnail, and the multi-level thumbnail may include a plurality of images with different resolutions obtained by performing multiple resampling operations on the original image.

[0183] In some embodiments, the processing module 1020 may also be used to compress the data of the second image in the third data structure area. It should be noted that after compression, the offset of each image changes, so the offset in the third data structure area also needs to be updated.

[0184] In some embodiments, the processing module 1020 may be specifically configured to define a projection coordinate system for the original image; define a coordinate reference level for the original image based on the projection coordinate system; and segment the original image according to the coordinate reference level to obtain a plurality of tiles.

[0185] Figure 11 is a schematic block diagram of an image processing device 1100 provided in an embodiment of the present application. As shown in Figure 11, the image processing device 1100 may include a transceiver module 1110 and a processing module 1120. The transceiver module 1110 can communicate with the outside world, and the processing module 1120 is used for data processing. The transceiver module 1110 may also be referred to as a communication interface.

[0186] In one possible design, the image processing device 1100 can implement steps or processes corresponding to those executed by the server (i.e., cloud device) in the above method embodiment, wherein the processing module 1120 can be used to execute processing-related operations of the server in the above image processing method embodiment, and the transceiver module 1110 can be used to execute transceiver-related operations of the server in the above image processing method embodiment.

[0187] In some embodiments, the transceiver module 1110 can be used to receive a first data request from a terminal device, wherein the first data request is used to request data of a first target image in a first image file, the first image file includes a second data structure area, the second data structure area includes data of a second image, the data of the second image includes data of multiple tiles, the multiple tiles include an image obtained by segmentation based on the first image, wherein the first target image includes one or more tiles in the second image; the processing module 1120 can be used to obtain data of the first target image in the first image file according to the first data request; the transceiver module 1110 can also be used to send data of the first target image to the terminal device.

[0188] Based on the above embodiment, the image processing device 1100 can receive the first data request sent by the terminal device through the transceiver module 1110, and the processing module 1120 can obtain one or more tiles included in the first target image according to the first data request, and send it to the terminal device, so that the terminal device does not need to download the original image in full, thereby significantly alleviating the problem of slow image loading on the cloud and improving browsing efficiency; and can also reduce the amount of data transmission.

[0189] In one possible design, the image processing device 1100 can implement steps or processes corresponding to those executed by the terminal device in the above method embodiment, wherein the processing module 1120 can be used to execute processing-related operations of the terminal device in the above image processing method embodiment, and the transceiver module 1110 can be used to execute transceiver-related operations of the terminal device in the above image processing method embodiment.

[0190] In some embodiments, the transceiver module 1110 can be used to send a first data request to a server, where the first data request is used to request data of a first target image in a first image file, where the first image file includes a second data structure area, where the second data structure area includes data of a second image, where the second image includes multiple tiles, where the multiple tiles include an image obtained by segmentation based on the first image data, where the first target image includes one or more tiles in the second image; the transceiver module 1110 can also be used to receive data of the first target image from the server; the processing module 1120 can be used to present the first target image based on the data of the first target image.

[0191] Based on the above scheme, the image processing device can send a first data request to the server through the transceiver module 1110, so as to request the first target image in the first image file in the server. The server then obtains one or more tiles included in the first target image according to the first data request, so that there is no need to download the original image in full. After the transceiver module 1110 receives the data of the first target image from the server, the processing module 1120 presents the first target image according to the data of the first target image, thereby significantly alleviating the problem of slow image loading on the cloud and improving browsing efficiency; and it can also reduce the amount of data transmission.

[0192] This application also provides a computing device 1200. As shown in Figure 12, computing device 1200 includes a bus 1202, a processor 1204, a memory 1206, and a communication interface 1208. Processor 1204, memory 1206, and communication interface 1208 communicate with each other via bus 1202. Computing device 1200 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in computing device 1200.

[0193] Bus 1202 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, among others. Buses may be classified as address buses, data buses, control buses, and the like. For ease of illustration, FIG12 shows a single bus line, but this does not imply a single bus or type of bus. Bus 1202 may include a path for transmitting information between various components of computing device 1200 (e.g., memory 1206, processor 1204, and communication interface 1208).

[0194] The processor 1204 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0195] The memory 1206 may include volatile memory, such as random access memory (RAM). The processor 1204 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).

[0196] Memory 1206 stores executable program code, which processor 1204 executes to implement the functions of the transceiver module and the processing module, thereby implementing the aforementioned image file generation method or image processing method. In other words, memory 1206 stores instructions for executing the aforementioned image file generation method or image processing method.

[0197] The communication interface 1208 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 1200 and other devices or a communication network.

[0198] Embodiments of the present application also provide a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.

[0199] As shown in Figure 13, the computing device cluster includes at least one computing device 1200. The memory 1206 in one or more computing devices 1200 in the computing device cluster may store the same instructions for executing the above-mentioned image file generation method or image processing method.

[0200] In some possible implementations, the memory 1206 of one or more computing devices 1200 in the computing device cluster may also store partial instructions for executing the aforementioned image file generation method or image processing method. In other words, the combination of one or more computing devices 1200 can collectively execute instructions for executing the aforementioned image file generation method or image processing method.

[0201] It should be noted that the memory 1206 in different computing devices 1200 in the computing device cluster may store different instructions, each for executing portions of the functions of the above-described image file generation method or image processing method. In other words, the instructions stored in the memory 1206 in different computing devices 1200 may implement the functions of one or more of the processing module and the transceiver module.

[0202] In some possible implementations, one or more computing devices in a computing device cluster may be connected via a network. The network may be a wide area network (WAN) or a local area network (LAN), among others. FIG. 14 illustrates one possible implementation. As shown in FIG. 14 , two computing devices 1200A and 1200B are connected via a network. Specifically, each computing device is connected to the network via a communication interface within the computing device. In this type of possible implementation, the memory 1206 in the computing device 1200A stores instructions for executing the functions of the task triggering module.

[0203] It should be understood that the functionality of the computing device 1200A shown in FIG14 may also be implemented by multiple computing devices 1200. Similarly, the functionality of the computing device 1200B may also be implemented by multiple computing devices 1200.

[0204] An embodiment of the present application also provides a chip, which includes a processor and a data interface. The processor reads instructions stored in a memory through the data interface to execute the above-mentioned image file generation method or image processing method.

[0205] The present application also provides a computer program product including instructions. The computer program product may be software or a program product including instructions that can be executed on a computing device or stored on any available medium. When executed on at least one computing device, the computer program product causes the at least one computing device to execute the aforementioned image file generation method or image processing method.

[0206] The present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center that contains one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute the above-mentioned image file generation method or image processing method.

[0207] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0208] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0209] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0210] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0211] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0212] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A method for generating an image file, characterized in that: The method comprises: Acquire data of a first image, wherein the data of the first image includes map data; Slicing the first image to generate a plurality of tiles; Generate a first image file according to the plurality of tiles, the first image file comprising: A first data structure area, used to store a file header of the first image file, wherein the file header is used to indicate a file type of the first image file; A second data structure area is used to store data of a second image, wherein the data of the second image includes data of the plurality of tiles; The third data structure area is used to store the offsets of the multiple tiles, and the offsets of the multiple tiles are used to indicate the storage location of the data of the multiple tiles in the second data structure area.

2. The method according to claim 1, characterized in that The method further comprises: The plurality of tiles are resampled to generate multi-level tiles, and the second image includes the multi-level tiles.

3. The method according to claim 1 or 2, characterized in that: For multiple homogeneous tiles among the multiple tiles, the data of the second image in the second data structure area includes data of feature tiles among the multiple homogeneous tiles, and the homogeneous tiles are tiles whose pixel proportion identical to that of the feature tiles reaches a predetermined threshold.

4. The method according to claim 3, characterized in that The offsets corresponding to the multiple homogeneous tiles stored in the third data structure area are the same, and the same offsets of the multiple homogeneous tiles indicate the storage position of the feature tile in the second data structure area.

5. The method according to any one of claims 1 to 4, characterized in that The third data structure area in the first image file is adjacent to the first data structure area.

6. The method according to any one of claims 1 to 5, characterized in that The third data structure area includes a tag, and the tag includes an index code of each tile in the second image and the offset.

7. The method according to any one of claims 1 to 6, characterized in that The second image also includes the first image and / or a first thumbnail, and the first thumbnail includes an image obtained by resampling the first image; The third data structure area also includes an offset corresponding to the first image and / or the first thumbnail.

8. The method according to claim 7, characterized in that The first thumbnail includes a multi-level thumbnail, and the multi-level thumbnail includes a plurality of images with different resolutions obtained by performing multiple resampling on the first image.

9. The method according to any one of claims 1 to 8, characterized in that The first image file also includes: A fourth data structure area, the fourth data structure area is used to store specific attributes of the multiple tiles, and the size of the specific attribute is greater than a certain threshold.

10. The method according to any one of claims 1 to 9, characterized in that The method further comprises: defining a projected coordinate system for the first image; defining a coordinate reference hierarchy for the first image based on the projected coordinate system; The first image is segmented according to the coordinate reference level to obtain the plurality of tiles.

11. A method for image processing, characterized in that: The method comprises: Receiving a first data request from a terminal device, the first data request is used to request data of a first target image in a first image file, the first image file includes a second data structure area, the second data structure area includes data of a second image, the second image includes a plurality of tiles, the plurality of tiles include an image obtained by segmenting the first image, wherein the first target image includes one or more tiles in the second image; Acquire data of the first target image in the first image file according to the first data request; Sending data of the first target image to the terminal device.

12. The method according to claim 11, characterized in that The second image includes multiple levels of tiles, and the multiple levels of tiles include multiple levels of tiles obtained by performing multiple resampling on the multiple tiles. Furthermore, the first target image specifically includes one or more tiles of the same level among the multiple levels of tiles.

13. The method according to claim 11 or 12, characterized in that: The first image file also includes a third data structure area, which is used to store offsets of data of multiple tiles in the second image, and the offsets are used to indicate storage locations of the data of the tiles in the second image in the second data structure area.

14. The method according to claim 13, characterized in that For multiple homogeneous tiles among the multiple tiles, the data of the second image in the second data structure area includes data of feature tiles among the multiple homogeneous tiles, and the homogeneous tiles are tiles whose pixel proportion identical to that of the feature tiles reaches a predetermined threshold.

15. The method according to claim 14, characterized in that The offsets corresponding to the multiple homogeneous tiles stored in the third data structure area are the same, and the same offsets of the multiple homogeneous tiles indicate the storage position of the feature tile in the second data structure area.

16. The method according to any one of claims 13 to 15, characterized in that: Acquiring data of the first target image in the first image file according to the first data request includes: determining the first target image according to the first data request; Determining, according to the first target image, a first tile corresponding to the first target image; Obtain the first offset, where the first offset is the offset of the first tile; According to the first offset, obtaining data of the first tile, The sending of the data of the first target image to the terminal device comprises: Send the data of the first tile to the terminal device.

17. The method according to any one of claims 13 to 15, characterized in that: The first data request includes a first offset, where the first offset is an offset of a first tile corresponding to the first target image. Acquiring data of the first target image in the first image file according to the first data request includes: According to the first offset, obtaining the first tile, The sending of the data of the first target image to the terminal device comprises: Send the data of the first tile to the terminal device.

18. The method according to any one of claims 13 to 17, characterized in that: Before receiving the first data request from the terminal device, the method further includes: receiving a second data request from the terminal device, wherein the second data request is used to request the third data structure area of ​​the first image file; Acquire the third data structure area according to the second data request; The third data structure area is sent to the terminal device.

19. The method according to any one of claims 13 to 18, characterized in that: The first image file further includes a first data structure area, the first data structure area includes a file header of the first image file, the file header is used to indicate a file type, and the third data structure area is adjacent to the first data structure area in the first image file.

20. The method according to any one of claims 13 to 19, characterized in that The third data structure area includes a tag, and the tag includes an index code of each tile in the second image and the offset.

21. The method according to any one of claims 13 to 20, characterized in that The second image also includes the first image and / or a first thumbnail, and the first thumbnail includes an image obtained by resampling the first image; The third data structure area also includes an offset corresponding to the data of the first image and / or the data of the first thumbnail.

22. The method according to claim 21, characterized in that The first thumbnail includes a multi-level thumbnail, and the multi-level thumbnail includes a plurality of images with different resolutions obtained by performing multiple resampling on the first image.

23. The method according to any one of claims 11 to 22, characterized in that: The first image file also includes: A fourth data structure area, the fourth data structure area is used to store specific attributes of the multiple tiles, and the size of the specific attribute is greater than a certain threshold.

24. A method of image processing, characterized in that: The method comprises: Sending a first data request to a server, the first data request being used to request data of a first target image in a first image file, the first image file comprising a second data structure area, the second data structure area comprising data of a second image, the second image comprising a plurality of tiles, the plurality of tiles comprising an image obtained by segmenting the first image, wherein the first target image comprises one or more tiles in the second image; receiving data of the first target image from the server; The first target image is presented according to the data of the first target image.

25. The method according to claim 24, characterized in that The second image includes multiple levels of tiles, and the multiple levels of tiles include multiple levels of tiles obtained by performing multiple resampling on the multiple tiles. Furthermore, the first target image specifically includes one or more tiles of the same level among the multiple levels of tiles.

26. The method according to claim 24 or 25, characterized in that The first image file further includes a third data structure area, where the third data structure area is used to store offsets of the data of the plurality of tiles, and the offsets are used to indicate storage locations of the data of the plurality of tiles in the second data structure area.

27. The method according to claim 26, characterized in that For multiple homogeneous tiles among the multiple tiles, the data of the second image in the second data structure area includes data of feature tiles among the multiple homogeneous tiles, and the homogeneous tiles are tiles whose pixel proportion that is the same as that of the feature tiles reaches a predetermined threshold.

28. The method according to claim 27, characterized in that The offsets corresponding to the multiple homogeneous tiles stored in the third data structure area are the same, and the same offsets of the multiple homogeneous tiles indicate the storage position of the feature tile in the second data structure area.

29. The method according to any one of claims 26 to 28, characterized in that The first data request includes a first offset, where the first offset is an offset of a first tile, and the first tile includes one or more tiles corresponding to the first target image.

30. The method according to claim 29, characterized in that Before sending the first data request to the server, the method further includes: Sending a second data request to the server, where the second data request is used to request the third data structure area of ​​the first image file; receiving the third data structure area from the server; The first offset is determined according to the third data structure area.

31. The method according to any one of claims 24 to 30, characterized in that Before sending the first data request to the server, the method further includes: Obtaining an image access request, where the image access request is used to request display of the first target image in the first image; The first target image is determined according to the image access request.

32. The method according to claim 31, characterized in that The determining the first target image comprises: Determining the level and pixel coordinates of the first target image according to the image access request; The first target image is determined according to the level and pixel coordinates of the first target image.

33. The method according to any one of claims 29-30, characterized in that The third data structure area includes a tag, wherein the tag includes an index code of each tile in the second image and the offset, The determining the first offset according to the third data structure area comprises: Obtaining the index code of the tile of the first target image; The first offset is determined by searching in the third data structure area according to the index code of the tile of the first target image.

34. The method according to any one of claims 24 to 33, characterized in that The first image file further includes a first data structure area, the first data structure area includes a file header of the first image file, the file header is used to indicate a file type, and the third data structure area is adjacent to the first data structure area in the first image file.

35. The method according to any one of claims 30 to 33, characterized in that The second image data in the second data structure area also includes data of the first image and / or data of a first thumbnail, and the first thumbnail includes an image obtained by resampling based on the first image data; The third data structure area also includes an offset corresponding to the data of the first image and / or the data of the first thumbnail.

36. The method according to claim 35, characterized in that The first thumbnail includes a multi-level thumbnail, and the multi-level thumbnail includes a plurality of images with different resolutions obtained by performing multiple resampling on the first image.

37. An image file generating device, characterized in that: The device comprises: A transceiver module, configured to receive data of a first image, wherein the data of the first image includes map data; A processing module, configured to segment the first image to generate a plurality of tiles; The processing module is further configured to generate a first image file according to the plurality of tiles, wherein the first image file includes: A first data structure area, used for storing a file header of the image file, wherein the file header is used for indicating a file type; A second data structure area is used to store data of a second image, wherein the data of the second image includes data of the plurality of tiles; The third data structure area is used to store the offsets of the multiple tiles in the second image data, and the offsets of the multiple tiles are used to indicate the storage locations of the data of the multiple tiles in the second image data.

38. An image processing device, characterized in that: The device comprises: a transceiver module, configured to receive a first data request from a terminal device, wherein the first data request is used to request data of a first target image in a first image file, wherein the first image file includes a second data structure area, wherein the second data structure area includes data of a second image, wherein the data of the second image includes data of a plurality of tiles, wherein the plurality of tiles includes an image obtained by segmenting the first image, wherein the first target image includes one or more tiles in the second image; A processing module, configured to obtain data of the first target image in the first image file according to the first data request; The transceiver module is further used to send data of the first target image to the terminal device.

39. An image processing device, characterized in that: The device comprises: A transceiver module is used to send a first data request to a server, wherein the first data request is used to request data of a first target image in a first image file, wherein the first image file includes a second data structure area, wherein the second data structure area includes data of a second image, wherein the second image includes a plurality of tiles, wherein the plurality of tiles include an image obtained by segmentation based on the first image data, wherein the first target image includes one or more tiles in the second image; The transceiver module is also used to receive data of the first target image from the server; A processing module is used to present the first target image according to the data of the first target image.

40. A computing device cluster, characterized in that: comprising at least one computing device, each computing device comprising a processor and a memory; The processor of the at least one computing device is used to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method as described in any one of claims 1-10 or 11-23 or 24-36.

41. A computer-readable storage medium, characterized in that The method comprises computer program instructions, which, when executed by a computing device cluster, cause the computing device cluster to perform the method as claimed in any one of claims 1-10, 11-23 or 24-36.

42. A computer program product comprising instructions, characterized in that When the instructions are executed by a computing device cluster, the computing device cluster executes the method as described in any one of claims 1-10, 11-23, or 24-36.

43. A cloud-side device, characterized in that: It includes at least one processor, which is coupled to at least one memory, and the at least one processor is used to execute a computer program or instruction stored in the at least one memory, so that the cloud-side device executes the method as described in any one of claims 1-10 or 11-23.

44. A terminal side device, characterized in that: The device comprises at least one processor coupled to at least one memory, wherein the at least one processor is used to execute a computer program or instruction stored in the at least one memory, so that the energy storage device executes the method as described in any one of claims 24-36.

45. A terminal-cloud collaborative system, characterized in that: It includes a cloud-side device as described in claim 43 and an end-side device as described in claim 44.

Citation Information

Patent Citations

  • Image file generation method, image processing method and device

    CN118796782A

  • Map data processing method and device and readable storage medium

    CN109597861A

  • Method and device for obtaining live-action electronic map, equipment and storage medium

    CN110309243A

  • Remote sensing image optimization processing method and device, electronic equipment and storage medium

    CN112070775A

  • Dynamic generation and suggestion of tiles based on user context

    CN113574520A