Work area background image display method and device, electronic equipment and storage medium
Through the combination of multi-level resolution image collection and image cache queue, multi-threading technology is used to optimize the display and operation of large-scale work area background images, solving the problem of low efficiency in multi-resolution image data processing in the prior art, and achieving efficient Background image display and operation.
Patent Information
- Application Number
- CN202310505905.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-06
- Publication Date
- 2024-11-08
AI Technical Summary
The existing GIS assisted physico-exploration acquisition design technology is difficult to efficiently process and display the background image of large-scale work area, especially under multi-resolution image data, resulting in inefficient operation.
By determining a multi-level resolution image set that matches the target work area background image, the image cache queue is used to read, write and update data in real time, and quickly respond and optimize the display area, and parallel processing of image data is used using multi-threading technology.
It improves the display and operation efficiency of background images in large-scale work areas, can efficiently process and display background images of large data volumes on ordinary workstations, and improves the work efficiency of GIS-assisted acquisition design.
Smart Images

Figure CN118916504A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of seismic data acquisition, and in particular to a method and device for displaying a work area background map, an electronic device, and a storage medium. Background Art
[0002] With the development of the petroleum geophysical exploration industry, the construction difficulty of oil and gas exploration areas is increasing. There are various obstacles in the exploration area where the excitation points cannot be laid, such as farmland, houses, wells, schools, high-voltage lines, etc. In order to improve the exploration efficiency, GIS (Geographic Information System) data such as high-definition satellite images and aerial photography are usually used as the background map of the construction area to carry out geophysical acquisition design and observation system optimization indoors. With the in-depth promotion of the "two widths and one height" seismic exploration technology, the resolution of the background map of the construction area has reached 0.1 to 0.5 meters, and large work areas can reach hundreds of GB or even TB levels. Such a huge background map has low display and operation efficiency when performing GIS-assisted acquisition design. Therefore, how to quickly display and operate the background map with large amounts of data on an ordinary workstation is a great challenge in the geophysical acquisition design of large work areas.
[0003] The existing GIS-assisted geophysical exploration acquisition design technology and software can load and operate the background map of the work area, but only support the display of background map data with the same resolution, and cannot support multi-resolution background map data well, which leads to low efficiency when zooming in, out, and panning the background map. Some professional image processing software can process and display images with multiple resolutions, but the data organization does not take into account the characteristics of the geophysical exploration acquisition work area and cannot be used for geophysical exploration acquisition design. Summary of the invention
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, embodiments of the present disclosure provide a method and device for displaying a work area background map, an electronic device, and a storage medium.
[0005] In a first aspect, an embodiment of the present disclosure provides a method for displaying a work area background image, the method comprising:
[0006] Determine a multi-resolution image set that matches the background image file of the target work area;
[0007] In response to the absence of image data of the target work area background image file displayed in the preset display area in the preset image cache queue, selecting image data of the target work area background image file from the multi-level resolution image set and writing it into the image cache queue;
[0008] In response to the presence of image data of the target work area background image file displayed in the preset display area in the preset image cache queue, reading the image data of the target work area background image file from the image cache queue;
[0009] The image data of the target work area background image file is displayed in the preset display area.
[0010] In a possible implementation manner, determining a multi-resolution image set matching the target work area background image file includes:
[0011] In response to the existence of a multi-level resolution image set matching the target work area background image file, providing the multi-level resolution image set;
[0012] In response to the absence of a multi-level resolution image set matching the target work area background image file, the target work area background image file is smoothed, and the smoothed target work area background image file is multi-level downsampled to obtain a multi-level resolution image set.
[0013] In a possible implementation manner, after displaying the image data of the target work area background image file in the preset display area, the method further includes:
[0014] Monitor the update action of the background image file of the target work area in real time, and determine the updated position of the background image file of the target work area in the display area;
[0015] In response to the updated position of the target work area background image file in the display area exceeding the preset critical area, selecting image data corresponding to the updated target work area background image file from the multi-resolution image set and writing it into the image cache queue;
[0016] In response to the updated position of the target work area background image file in the display area not exceeding the preset critical area, image data corresponding to the updated target work area background image file is read from the image cache queue.
[0017] In a possible implementation, the updating action is translation, and the selecting of image data corresponding to the updated target work area background image file from the multi-resolution image set and writing the image data into the image cache queue includes:
[0018] Determine the position and size of the display area after translation;
[0019] Calculate the center position of the display area after translation, and use the center position as the center position of the buffer area after translation and the critical area after translation, and determine the size of the buffer area after translation and the critical area after translation according to the preset ratio of the length and width of the buffer area, the length and width of the critical area, and the length and width of the display area;
[0020] According to the size range of the cache area after translation, the image data is read from the background image file of the updated target work area, and the read image data is updated to the image cache queue.
[0021] In a possible implementation, the updating action is zooming in or out, and the selecting image data corresponding to the background image file of the updated target work area from the multi-resolution image set and writing it into the image cache queue includes:
[0022] Determine the position and size of the updated display area;
[0023] Calculate the center position of the updated display area, and use the center position as the center position of the updated cache area and the updated critical area, and determine the size of the updated cache area and the updated critical area according to the preset ratio of the length and width of the cache area, the length and width of the critical area, and the length and width of the display area;
[0024] Calculate the image display resolution according to the updated display area, and select a target work area background image file corresponding to the image display resolution from the multi-resolution image set;
[0025] According to the size range of the updated cache area, the image data is read from the selected target work area background image file, and the read image data is updated to the image cache queue.
[0026] In a possible implementation manner, selecting a target work area background image file from a multi-resolution image set and writing the file into an image cache queue includes:
[0027] Determine the image display resolution according to the size of the display area, and select a target work area background image file corresponding to the image display resolution from the multi-resolution image set;
[0028] Calculate the corresponding critical area and cache area according to the display area;
[0029] Based on the background image file of the target work area, a cache image is created according to the size of the cache area;
[0030] A new cache node is created, the display area, the critical area, the cache area and the cache image are stored in the cache node, and a write thread is called to write the cache node into the image cache queue.
[0031] In a possible implementation manner, reading the target work area background image file from the image cache queue includes:
[0032] Determine the image display resolution according to the size of the display area, and select a target work area background image file corresponding to the image display resolution from the multi-resolution image set;
[0033] Calculate the corresponding critical area and cache area according to the display area;
[0034] Reading an image cache queue node, wherein the image cache queue node satisfies the following conditions: the cached image in the image cache queue node has the same resolution as the display area, and the display area is in the cache area;
[0035] Get the cached image of the image cache node, perform an intersection operation with the display area, and draw the intersected image into the display area.
[0036] In a second aspect, an embodiment of the present disclosure provides a work area background image display device, comprising:
[0037] A determination module, used to determine a multi-level resolution image set that matches the background image file of the target work area;
[0038] A selection module, configured to select the image data of the target work area background image file from the multi-resolution image set and write it into the image cache queue in response to the absence of the image data of the target work area background image file displayed in the preset display area in the preset image cache queue;
[0039] A reading module, configured to read the image data of the target work area background image file displayed in the preset display area from the image cache queue in response to the image data of the target work area background image file being displayed in the preset display area existing in the preset image cache queue;
[0040] The display module is used to display the image data of the background image file of the target work area in a preset display area.
[0041] In a third aspect, an embodiment of the present disclosure provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0042] Memory, used to store computer programs;
[0043] The processor is used to implement the above-mentioned work area background image display method when executing the program stored in the memory.
[0044] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the above-mentioned method for displaying a work area background map is implemented.
[0045] The above technical solution provided by the embodiment of the present disclosure has at least some or all of the following advantages compared with the prior art:
[0046] The method for displaying a work area background map described in the embodiment of the present disclosure determines a multi-level resolution image set that matches a target work area background map file; in response to the absence of image data of the target work area background map file displayed in a preset display area in a preset image cache queue, selects image data of the target work area background map file from the multi-level resolution image set and writes it into the image cache queue; in response to the presence of image data of the target work area background map file displayed in a preset display area in the preset image cache queue, reads image data of the target work area background map file from the image cache queue; displays image data of the target work area background map file in the preset display area, and for background map data of a large petroleum geophysical exploration work area, selects image data required for the currently displayed cache area from the multi-level resolution image set of the target work area background map, stores image data in the image cache queue through multi-threaded reading and writing technology, and reads image data from the image cache queue, thereby realizing efficient operation of background maps of large work areas and improving the work efficiency of GIS-assisted acquisition design. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0048] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0049] Figure 1 The following schematically shows a flow chart of a method for displaying a work area background image according to an embodiment of the present disclosure;
[0050] Figure 2 A schematic diagram of background image caching according to an embodiment of the present disclosure is schematically shown;
[0051] Figure 3 A schematic diagram of updating a translation background image cache according to an embodiment of the present disclosure is schematically shown;
[0052] Figure 4 A schematic diagram of updating the scaling background image cache according to an embodiment of the present disclosure is shown schematically;
[0053] Figure 5 A schematic diagram of a background image display process according to an embodiment of the present disclosure is shown;
[0054] Figure 6 The original background image according to the embodiment of the present disclosure is schematically shown;
[0055] Figure 7 Schematically shows a background image after translation according to an embodiment of the present disclosure;
[0056] Figure 8 Schematically shows an enlarged background image according to an embodiment of the present disclosure;
[0057] Fig. 9 Schematically shows a zoomed-out background image according to an embodiment of the present disclosure;
[0058] Fig.10 A structural block diagram schematically shows a device for displaying a work area background image according to an embodiment of the present disclosure; and
[0059] Fig.11 The structural block diagram of an electronic device according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure.
[0061] See also Figure 1 , an embodiment of the present disclosure provides a method for displaying a work area background image, the method comprising:
[0062] S1, determine a multi-resolution image set that matches the background image file of the target work area;
[0063] S2, in response to the fact that the image data of the target work area background image file displayed in the preset display area does not exist in the preset image cache queue, the image data of the target work area background image file is selected from the multi-resolution image set and written into the image cache queue;
[0064] S3, in response to the existence of image data of the target work area background image file displayed in the preset display area in the preset image cache queue, reading the image data of the target work area background image file from the image cache queue;
[0065] S4, displaying the image data of the target work area background image file in a preset display area.
[0066] In this embodiment, in step S1, determining a multi-level resolution image set matching the target work area background image file includes:
[0067] In response to the existence of a multi-level resolution image set matching the target work area background image file, providing the multi-level resolution image set;
[0068] In response to the absence of a multi-level resolution image set matching the target work area background image file, the target work area background image file is smoothed, and the smoothed target work area background image file is multi-level downsampled to obtain a multi-level resolution image set.
[0069] In some embodiments, for the target work area background image file, according to different display resolutions, a low-pass filter is used to smooth the image, and the smoothed image is downsampled and halved in the horizontal and vertical directions step by step, so as to obtain a series of reduced-size images, and a series of image pyramid files are formed on the hard disk as a multi-resolution image set, wherein the resolution of the image pyramid gradually decreases from bottom to top. If the image pyramid has 18 levels, the bottom layer of the pyramid is level 0 with the highest resolution, which is the original image resolution, and level 18 is the highest level with the lowest resolution. The resolution from level 0 to level 18 gradually decreases. In actual applications, when displaying a part of the work area image, the current image resolution can be determined according to the geographic coordinate range of the displayed part, and the corresponding image pyramid file can be located according to the resolution level, thereby realizing fast reading of image data.
[0070] In this embodiment, after displaying the image data of the target work area background image file in the preset display area, the method further includes:
[0071] Monitor the update action of the background image file of the target work area in real time, and determine the updated position of the background image file of the target work area in the display area;
[0072] In response to the updated position of the target work area background image file in the display area exceeding the preset critical area, selecting image data corresponding to the updated target work area background image file from the multi-resolution image set and writing it into the image cache queue;
[0073] In response to the updated position of the target work area background image file in the display area not exceeding the preset critical area, image data corresponding to the updated target work area background image file is read from the image cache queue.
[0074] In this embodiment, the updating action is translation, and the image data corresponding to the background image file of the updated target work area is selected from the multi-resolution image set and written into the image cache queue, including:
[0075] Determine the position and size of the display area after translation;
[0076] Calculate the center position of the display area after translation, and use the center position as the center position of the buffer area after translation and the critical area after translation, and determine the size of the buffer area after translation and the critical area after translation according to the preset ratio of the length and width of the buffer area, the length and width of the critical area, and the length and width of the display area;
[0077] According to the size range of the cache area after translation, the image data is read from the background image file of the updated target work area, and the read image data is updated to the image cache queue.
[0078] In this embodiment, the updating action is zooming in or out, and the image data corresponding to the background image file of the updated target work area is selected from the multi-resolution image set and written into the image cache queue, including:
[0079] Determine the position and size of the updated display area;
[0080] Calculate the center position of the updated display area, and use the center position as the center position of the updated cache area and the updated critical area, and determine the size of the updated cache area and the updated critical area according to the preset ratio of the length and width of the cache area, the length and width of the critical area, and the length and width of the display area;
[0081] Calculate the image display resolution according to the updated display area, and select a target work area background image file corresponding to the image display resolution from the multi-resolution image set;
[0082] According to the size range of the updated cache area, the image data is read from the selected target work area background image file, and the read image data is updated to the image cache queue.
[0083] In this embodiment, in step S2, selecting a target work area background image file from a multi-resolution image set and writing it into an image cache queue includes:
[0084] Determine the image display resolution according to the size of the display area, and select a target work area background image file corresponding to the image display resolution from the multi-resolution image set;
[0085] Calculate the corresponding critical area and cache area according to the display area;
[0086] Based on the target work area background image file, based on the aspect ratio of the cache image and the cache area, a cache image is created according to the size of the cache area;
[0087] A new cache node is created, the display area, the critical area, the cache area and the cache image are stored in the cache node, and a write thread is called to write the cache node into the image cache queue.
[0088] In some embodiments, the image cache queue is used to realize the rapid display of a designated area of a large work area background image through the following steps:
[0089] 1) Create a cache area for the background image, such as Figure 2 As shown in the figure, the relationship between the display area, critical area, and cache area is shown, that is, the display area is in the critical area, and the critical area is in the cache area. Assume:
[0090] The width of the display area is W1 and the height is H1. The display area Size1 = W1*H1
[0091] The width of the critical region is W2 and the height is H2. The area of the critical region Size2 = W2*H2
[0092] The width of the cache area is W3 and the height is H3. The cache area Size3 = W3*H3
[0093] The relationship between the display area, critical area, and cache area is:
[0094] W3:W2:W1=3:2:1,H3:H2:H1=3:2:1
[0095] We can get:
[0096] Size3:Size2:Size1=9:4:1
[0097] 2) Establish an image cache queue
[0098] When panning and zooming the background image, cache multiple copies of image data in the image cache queue. The image cache queue is used to cache image data. The size of the image cache queue is related to the memory size of the machine. The image cache queue is updated on the principle of first-in-first-out. The initial size of the image cache queue is Np. If the number of image cache nodes is less than Np, you can directly add a new image cache node to the image cache queue. If the number of image cache nodes is equal to Np, you need to delete an image cache node according to the principle of first-in-first-out, and then add a new image cache node to the queue.
[0099] In some embodiments, when the background image is panned, the image cache queue is updated by the following steps:
[0100] like Figure 3 As shown in FIG. 1 , during the image translation operation, if the display area is within the critical area, the image data to be displayed is directly read from the image cache queue, and the image cache queue does not need to be updated. If the display area exceeds the critical area, the image cache queue is updated. Figure 3 The critical area is updated to critical area 2, the cache area is updated to cache area 2, a new cache area is constructed and the image cache queue is updated according to the new cache area.
[0101] The translation background image cache update strategy is as follows:
[0102] (A) Determine the position and size of the display area after translation.
[0103] (B) After finding the center position of the display area and using it as the center position of the cache area and the critical area, the size of the cache area and the critical area is determined according to the rule that the ratio of the length and width of the cache area, the length and width of the critical area, and the length and width of the display area is 3:2:1.
[0104] (C) Since the translation operation does not change the resolution of the image, the level of the pyramid file is not changed. According to the cache area range, the image data to be cached is read from the pyramid file of the same level into the memory, and the image data to be cached is updated to the image cache queue.
[0105] In some embodiments, when scaling the background image, the image cache queue is updated by the following steps:
[0106] like Figure 4 As shown, scaling the background image will change the range of the display area. When the background image is reduced, the display area range increases, the resolution of the view is calculated, and the lower-level data corresponding to the resolution matching the image pyramid is read. When the background image is enlarged, the display area range decreases, the resolution of the view is calculated, and the higher-level data corresponding to the resolution matching the image pyramid is read.
[0107] The scaling background image cache update strategy is as follows:
[0108] (A) Determine the position and size of the zoomed display area.
[0109] (B) After finding the center position of the display area and using it as the center position of the cache area and the critical area, the size of the cache area and the critical area is determined according to the rule that the ratio of the length and width of the cache area, the length and width of the critical area, and the length and width of the display area is 3:2:1.
[0110] (C) Since the zoom operation changes the view resolution, it is necessary to recalculate the view resolution based on the image display area and find the level corresponding to the matching resolution of the image pyramid. Figure 4 In the example, the image pyramid level of the current image is L a , the background image is reduced, and the image pyramid level corresponding to the calculated image display resolution is L b , according to the cache area range, from L b The cached image data is read from the pyramid file of the level into the memory and the cache queue is updated. The background image is enlarged and the image display resolution is calculated to correspond to the image pyramid level L c, according to the cache area range, from L c Read cached image data from the pyramid file of the level into memory and update the image cache queue. Figure 4 The middle right part shows the relationship between the display area, critical area, cache area, and image area.
[0111] In some embodiments, the update of the image cache queue is implemented by multi-threaded reading and writing, as follows:
[0112] Create an image cache writing thread, which is responsible for writing the newly added image cache nodes during the background image interaction process into the image cache queue to update the image cache queue. The writing strategy of the image cache writing thread is as follows:
[0113] (A) Determine the image resolution according to the size of the display area and obtain the corresponding image pyramid level.
[0114] (B) Calculate the corresponding critical area and cache area based on the display area.
[0115] (C) Create a new image cache node, read the image data of the cache area of the corresponding level from the image pyramid file, and call the write thread to complete the update of the image cache queue.
[0116] Create an image cache reading thread, which is responsible for reading the image data of the display area from the image cache queue for fast image display. The reading strategy of the image cache reading thread is as follows:
[0117] (A) Determine the image resolution according to the size of the display area and obtain the corresponding image pyramid level.
[0118] (B) Calculate the corresponding critical area and cache area based on the display area.
[0119] (C) Reading an image cache queue node, the cache node satisfies the following conditions: the image pyramid level of the view is equal to the pyramid level of the node cache data, and the display area is in the cache area of the image cache node. Reading the image data of the display area in the node cache area.
[0120] This embodiment uses a multi-threaded approach to implement image cache data reading and writing, thereby improving the efficiency of reading image data. The combination of image cache queue and multi-threaded technology can achieve fast display and smooth operation of large work area background images.
[0121] The present invention realizes multi-resolution display of background maps of large work areas through multi-resolution file storage technology, which can realize the storage structure and rapid positioning of image data; through multi-area image cache queues, rapid display of images of designated areas can be realized; through multi-threaded reading and writing technology of background map data, parallel cache creation, reading and display are realized, further improving the display and operation efficiency of background maps of large work areas, thereby improving the work efficiency of GIS-assisted acquisition design of large geophysical exploration areas.
[0122] In this embodiment, in step S3, reading the target work area background image file from the image cache queue includes:
[0123] Determine the image display resolution according to the size of the display area, and select a target work area background image file corresponding to the image display resolution from the multi-resolution image set;
[0124] Calculate the corresponding critical area and cache area according to the display area;
[0125] Reading an image cache queue node, wherein the image cache queue node satisfies the following conditions: the cached image in the image cache queue node has the same resolution as the display area, and the display area is in the cache area;
[0126] Get the cached image of the image cache node, perform an intersection operation with the display area, and draw the intersected image into the display area.
[0127] See also Figure 5 The method for quickly displaying a background map of a large petroleum geophysical exploration area provided by the present disclosure includes:
[0128] (1) Load the background image file of the large work area. If it is a TIFF format file, read the TIFF format data file to obtain the background image data; if it is in other formats, the file does not exist, or the file permission is improper, do not read it.
[0129] (2) When loading the background image file, determine whether the background image TIFF file has a corresponding pyramid file. If so, use the file directly for subsequent operations; if not, create a multi-resolution image pyramid file. When creating an image pyramid, based on the pixel resolution of the image, a maximum of 0-18 levels of image pyramid files can be created. Among them, level 0 is the original image resolution, with the highest resolution, and level 18 is the lowest resolution. The resolutions of levels 0-18 decrease step by step.
[0130] (3) According to the initial display ratio of the background image of the large work area, the appropriate display resolution is calculated to obtain the display area, critical area, and cache area.
[0131] (4) Establish a suitable image data cache queue based on the cache area size and device memory size.
[0132] (5) According to the size of the cache area, use multi-threading technology to read the corresponding image pyramid file content and create a cache image.
[0133] (6) Create an image cache node, put in the display area, critical area, cache area and cache image, add the node to the image cache queue as the initial image cache node of the large work area background image.
[0134] (7) Using multi-threading technology, obtain the cache image of the initial image cache node, perform an intersection operation with the display area in the window, and draw the intersected image into the display area of the window.
[0135] (8) If a translation operation is performed on the background image of a large work area, determine whether the display area after the translation exceeds the critical area. If not, use multi-threading technology to obtain the cache image of the initial image cache node, perform an intersection operation with the display area in the window, and draw the image after the intersection into the display area of the window; if it exceeds the critical area, update the cache queue according to the new area, use multi-threading technology to build a new image cache node, read and create the cache image, and display it. Figure 6 and Figure 7 They are the original background image and the translated background image respectively.
[0136] (9) If a scaling operation is performed on the background image of a large work area, the cache queue is updated according to the scaled critical area, a new image cache node is constructed using multi-threading technology, the cache image is read and created, and displayed. Figure 6 , Figure 8 and Fig. 9 They are the original background image, the enlarged background image, and the reduced background image.
[0137] The present invention aims at background image data of large-scale work areas, adopts a method of exchanging space for time, opens up an image cache in the memory, provides data support for the display of the image, and thus speeds up the interaction efficiency of the image.
[0138] See also Fig.10 , an embodiment of the present disclosure provides a work area background image display device, comprising:
[0139] A determination module 11 is used to determine a multi-level resolution image set that matches the background image file of the target work area;
[0140] A selection module 12 is used for selecting the image data of the target work area background image file from the multi-level resolution image set and writing it into the image cache queue in response to the absence of the image data of the target work area background image file displayed in the preset display area in the preset image cache queue;
[0141] A reading module 13 is used for reading the image data of the target work area background image file displayed in the preset display area from the image cache queue in response to the presence of the image data of the target work area background image file in the preset display area in the preset image cache queue;
[0142] The display module 14 is used to display the image data of the target work area background image file in a preset display area.
[0143] The work area background map display device disclosed in the present invention combines multi-resolution file storage, multi-region image cache queue and multi-threaded reading and writing technology of large-scale geophysical work area background maps, optimizes the display and interactive operation process of large-scale geophysical work area background map data, and is used for GIS-assisted collection design of large-scale petroleum geophysical exploration work areas, which can improve the efficiency of GIS-assisted collection design.
[0144] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0145] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the disclosed solution. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0146] In the above second embodiment, any multiple of the determination module 11, the selection module 12, the reading module 13 and the display module 14 can be combined in one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. At least one of the determination module 11, the selection module 12, the reading module 13 and the display module 14 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in any appropriate combination of any of them. Alternatively, at least one of the determination module 11, the selection module 12, the reading module 13 and the display module 14 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be executed.
[0147] See also Fig.11 , an electronic device provided by an embodiment of the present disclosure includes a processor 1110, a communication interface 1120, a memory 1130 and a communication bus 1140, wherein the processor 1110, the communication interface 1120, and the memory 1130 communicate with each other through the communication bus 1140;
[0148] Memory 1130, used for storing computer programs;
[0149] The processor 1110 is used to implement the following work area background image display method when executing the program stored in the memory 1130:
[0150] Determine a multi-resolution image set that matches the background image file of the target work area;
[0151] In response to the absence of image data of the target work area background image file displayed in the preset display area in the preset image cache queue, selecting image data of the target work area background image file from the multi-level resolution image set and writing it into the image cache queue;
[0152] In response to the presence of image data of the target work area background image file displayed in the preset display area in the preset image cache queue, reading the image data of the target work area background image file from the image cache queue;
[0153] The image data of the target work area background image file is displayed in the preset display area.
[0154] The communication bus 1140 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus 1140 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0155] The communication interface 1120 is used for communication between the above electronic device and other devices.
[0156] The memory 1130 may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory 1130 may also be at least one storage device located away from the processor 1110.
[0157] The above-mentioned processor 1110 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0158] The embodiment of the present disclosure further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the work area background map display method described above is implemented.
[0159] The computer-readable storage medium may be included in the device / apparatus described in the above embodiment; or it may exist independently without being assembled into the device / apparatus. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the work area background map display method according to the embodiment of the present disclosure is implemented.
[0160] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0161] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0162] The foregoing is merely a specific embodiment of the present disclosure, which enables those skilled in the art to understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features applied herein.
Claims
1. A method for displaying a work area background image, characterized in that: The method comprises: Determine a multi-resolution image set that matches the background image file of the target work area; In response to the absence of image data of the target work area background image file displayed in the preset display area in the preset image cache queue, selecting image data of the target work area background image file from the multi-level resolution image set and writing it into the image cache queue; In response to the presence of image data of the target work area background image file displayed in the preset display area in the preset image cache queue, reading the image data of the target work area background image file from the image cache queue; The image data of the target work area background image file is displayed in the preset display area.
2. The method according to claim 1, characterized in that The step of determining a multi-level resolution image set matching the target work area background image file comprises: In response to the existence of a multi-level resolution image set matching the target work area background image file, providing the multi-level resolution image set; In response to the absence of a multi-level resolution image set matching the target work area background image file, the target work area background image file is smoothed, and the smoothed target work area background image file is multi-level downsampled to obtain a multi-level resolution image set.
3. The method according to claim 1, characterized in that After displaying the image data of the target work area background image file in the preset display area, the method further includes: Monitor the update action of the background image file of the target work area in real time, and determine the updated position of the background image file of the target work area in the display area; In response to the updated position of the target work area background image file in the display area exceeding the preset critical area, selecting image data corresponding to the updated target work area background image file from the multi-resolution image set and writing it into the image cache queue; In response to the updated position of the target work area background image file in the display area not exceeding the preset critical area, image data corresponding to the updated target work area background image file is read from the image cache queue.
4. The method according to claim 3, characterized in that The updating action is translation, and the image data corresponding to the background image file of the updated target work area is selected from the multi-resolution image set and written into the image cache queue, including: Determine the position and size of the display area after translation; Calculate the center position of the display area after translation, and use the center position as the center position of the buffer area after translation and the critical area after translation, and determine the size of the buffer area after translation and the critical area after translation according to the preset ratio of the length and width of the buffer area, the length and width of the critical area, and the length and width of the display area; According to the size range of the cache area after translation, the image data is read from the background image file of the updated target work area, and the read image data is updated to the image cache queue.
5. The method according to claim 3, characterized in that: The updating action is zooming in or out, and the image data corresponding to the background image file of the updated target work area is selected from the multi-resolution image set and written into the image cache queue, including: Determine the position and size of the display area after updating; Calculate the center position of the updated display area, and use the center position as the center position of the updated cache area and the updated critical area, and determine the size of the updated cache area and the updated critical area according to the preset ratio of the length and width of the cache area, the length and width of the critical area, and the length and width of the display area; Calculate the image display resolution according to the updated display area, and select a target work area background image file corresponding to the image display resolution from the multi-resolution image set; According to the size range of the updated cache area, the image data is read from the selected target work area background image file, and the read image data is updated to the image cache queue.
6. The method according to claim 1, characterized in that The step of selecting a target work area background image file from a multi-resolution image set and writing the file into an image cache queue includes: Determine the image display resolution according to the size of the display area, and select a target work area background image file corresponding to the image display resolution from the multi-resolution image set; Calculate the corresponding critical area and cache area according to the display area; Based on the background image file of the target work area, a cache image is created according to the size of the cache area; A new cache node is created, the display area, the critical area, the cache area and the cache image are stored in the cache node, and a write thread is called to write the cache node into the image cache queue.
7. The method according to claim 1, characterized in that The step of reading the target work area background image file from the image cache queue includes: Determine the image display resolution according to the size of the display area, and select a target work area background image file corresponding to the image display resolution from the multi-resolution image set; Calculate the corresponding critical area and cache area according to the display area; Reading an image cache queue node, wherein the image cache queue node satisfies the following conditions: the cached image in the image cache queue node has the same resolution as the display area, and the display area is in the cache area; Get the cached image of the image cache node, perform an intersection operation with the display area, and draw the intersected image into the display area.
8. A work area background image display device, characterized in that: include: A determination module, used to determine a multi-level resolution image set that matches the background image file of the target work area; A selection module, configured to select the image data of the target work area background image file from the multi-resolution image set and write it into the image cache queue in response to the absence of the image data of the target work area background image file displayed in the preset display area in the preset image cache queue; A reading module, configured to read the image data of the target work area background image file displayed in the preset display area from the image cache queue in response to the image data of the target work area background image file being displayed in the preset display area existing in the preset image cache queue; The display module is used to display the image data of the background image file of the target work area in a preset display area.
9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory, used to store computer programs; The processor is used to implement the work area background map display method described in any one of claims 1 to 7 when executing the program stored in the memory.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for displaying a work area background map according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
IO multi-thread computing method and system for fast building image pyramid
CN106528699A
Rapid caching method for large-scale remote sensing image
CN107767324A
Scheduling method for large-size satellite remote sensing image display
CN112965826A
