A web worker-based image data lazy loading method and system
By using a WebWorker-based lazy loading method, the metadata of the first series is loaded first and the instance image is loaded automatically according to the hierarchical structure of the DICOM file. Subsequent images of other series are loaded on demand. This solves the problems of resource waste and lag in traditional loading methods and improves the efficiency of image data loading and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 安徽福晴医疗装备有限公司
- Filing Date
- 2024-08-13
- Publication Date
- 2026-04-21
AI Technical Summary
Traditional browsers, when loading large volumes of medical image data using a single thread, result in long user wait times, high resource consumption, and negatively impact system performance and stability.
A lazy loading method based on WebWorker is adopted. According to the hierarchical structure of the DICOM file, the metadata of the first series is loaded first and the instance image is loaded automatically. Subsequent images of other series are loaded only when required by the user. The concurrent loading feature of WebWorker is used for asynchronous concurrent loading.
It achieves on-demand loading, reducing resource consumption and network bandwidth usage, and reducing lag issues and user waiting time caused by the main thread handling too many tasks.
Smart Images

Figure CN119108084B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical image data processing technology, and in particular to a lazy loading method and system for image data based on WebWorker. Background Technology
[0002] Currently, thanks to various modern front-end technologies, image data viewing can be achieved through image viewing software running in a browser environment, allowing users to access image data anytime, anywhere, without being restricted by client software access limitations. However, medical image data generated by machines such as CT and MRI are typically large in size. Loading the entire image data using a traditional browser's single-threaded approach is time-consuming, causing users to wait excessively during loading, thus impacting their experience. Furthermore, it consumes more bandwidth resources, affecting the browser's system performance and stability. Summary of the Invention
[0003] To address the technical problems existing in the background art, this invention proposes a lazy loading method and system for image data based on WebWorker.
[0004] This invention proposes a lazy loading method for image data based on WebWorker, comprising:
[0005] In response to a user's query for a specific DICOM file, retrieve a list of related DICOM files.
[0006] Based on the series list in the DICOM file, retrieve the metadata of each series in the series list of the DICOM file;
[0007] After the metadata of the first series in the series list is obtained, the instance image of the first series is automatically loaded based on the metadata of the first series.
[0008] After the metadata of the remaining series in the series list has been retrieved, the instance image of that series is loaded only in response to a user's query operation on a particular series in the remaining series in the series list, based on the metadata of that series.
[0009] Preferably, in response to a user's query for a specific DICOM file, a series list of the DICOM files is obtained, specifically including:
[0010] In response to a user's query for a specific DICOM file, generate a request to retrieve a series list of that DICOM file.
[0011] Based on the series list retrieval request for the DICOM file, obtain the series list of the DICOM file.
[0012] Preferably, based on the series list of the DICOM file, the metadata of each series in the series list of the DICOM file is obtained, specifically including:
[0013] Based on the series list of the DICOM file, generate metadata retrieval requests for each series in the series list of the DICOM file;
[0014] Based on the metadata retrieval requests for each series in the series list that generated the DICOM file, retrieve the metadata for each series in the series list of the DICOM file.
[0015] Preferably, after the metadata of the remaining series in the series list has been obtained, the instance image of that series is loaded only in response to a user's query operation on a particular series in the remaining series in the series list, based on the metadata of that series. Specifically, this includes:
[0016] After the metadata of the remaining series in the series list has been obtained, an instance image loading request for that series is generated only in response to a user's query operation for a particular series in the remaining series in the series list, based on the metadata of that series.
[0017] Generate an instance image loading request for the series based on the series' metadata, and load the instance images for the series.
[0018] Preferably, based on the metadata of the first series, the instance images of the first series are automatically loaded, specifically including:
[0019] Based on the metadata of the first series, automatically generate asynchronous image loading requests;
[0020] Based on the asynchronous image loading request, obtain the asynchronously loaded instance image;
[0021] Load the asynchronously loaded instance image;
[0022] Preferably, loading the asynchronously loaded instance image specifically includes:
[0023] Concurrent loading of asynchronously loaded instance images.
[0024] This invention also proposes a lazy loading system for image data based on WebWorker, comprising:
[0025] Data acquisition module and data lazy loading module;
[0026] The data acquisition module is used to retrieve a series list of DICOM files in response to a user's query operation for a specific DICOM file;
[0027] Based on the series list in the DICOM file, retrieve the metadata of each series in the series list of the DICOM file;
[0028] The data lazy loading module is used to automatically load the instance image of the first series after the metadata of the first series in the series list has been obtained, based on the metadata of the first series.
[0029] It is also used to load the instance image of a series based on its metadata only when the metadata of the other series in the series list has been retrieved, in response to a user's query operation on a particular series in the other series in the series list.
[0030] Preferably, the data lazy loading module is also used to generate a series list retrieval request for the DICOM file in response to a user's query operation for a certain DICOM file;
[0031] The data acquisition module is used to obtain the series list of the DICOM file based on the series list acquisition request of the DICOM file.
[0032] Preferably, the data lazy loading module is also used to generate metadata retrieval requests for each series in the series list of the DICOM file based on the series list of the DICOM file;
[0033] The data acquisition module is also used to acquire the metadata of each series in the series list of the DICOM file based on the metadata acquisition request of each series in the series list of the DICOM file.
[0034] Preferably, the data lazy loading module is also used to generate an instance image loading request for a series based on the metadata of that series only when responding to a user's query operation on a series among the remaining series in the series list after the metadata of each of the other series in the series list has been obtained.
[0035] And load the instance images for that series based on the instance image loading request for that series.
[0036] Preferably, the data lazy loading module is used to automatically load the instance image of the first series after the metadata of the first series in the series list has been obtained, based on the metadata of the first series, specifically including:
[0037] The data lazy loading module is used to automatically generate asynchronous image loading requests based on the metadata of the first series;
[0038] The data acquisition module is used to obtain asynchronously loaded instance images based on the asynchronous image loading request;
[0039] The data lazy loading module is also used to load asynchronously loaded instance images;
[0040] Preferably, it also includes a WebWorker control loading module;
[0041] The data lazy loading module is also used to load asynchronously loaded instance images, specifically including:
[0042] The data lazy loading module is also used to concurrently load asynchronously loaded instance images by calling the WebWorker control loading module.
[0043] The proposed WebWorker-based lazy loading method and system for image data in this invention can load data according to the hierarchical structure of DICOM, which helps to better organize and manage DICOM data. This allows medical image data to be organized and retrieved according to the hierarchical relationship of Patient, Study, Series, and Instance. Moreover, during the hierarchical loading process, after the metadata of the first series in the series list is obtained, the instance image of the first series is automatically loaded based on the metadata of the first series. After the metadata of the remaining series in the series list is obtained, they are not loaded temporarily. The instance image of the remaining series is loaded only when the user searches for a series in the remaining series in the series list, i.e., in response to the user's search operation for a series in the remaining series in the series list (i.e., lazy loading). This enables on-demand loading, avoids the unnecessary resource consumption caused by traditional full loading, and reduces the occupation of network bandwidth and storage resources. It also reduces the lag caused by the main thread handling too many tasks and the time the user waits for data loading. Attached Figure Description
[0044] Figure 1 This is a schematic diagram of the structure of a lazy loading method for image data based on WebWorker proposed in this invention. Detailed Implementation
[0045] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0046] It's important to understand that the DICOM data model presents a hierarchical structure from Patient to Study, then to Series, and finally to Instance. Patient is the top-level entity in the DICOM data model. Each Patient has one or more Studies, each Study contains multiple Series, and each Series also contains multiple Instances. This hierarchical structure helps to better organize and manage DICOM data, enabling medical imaging data to be organized and retrieved according to the hierarchical relationship between Patient, Study, Series, and Instance.
[0047] Reference Figure 1 This invention also proposes a lazy loading method for image data based on WebWorker, including:
[0048] In response to a user's query for a specific DICOM file, retrieve a list of series for that DICOM file.
[0049] Based on the series list in the DICOM file, obtain the metadata of each series in the series list in the DICOM file;
[0050] After the metadata of the first series in the series list is obtained, the instance image of the first series is automatically loaded based on the metadata of the first series.
[0051] After the metadata of the other series in the series list has been obtained, the instance image of the series is loaded only when the user queries a series in the other series in the series list, i.e., in response to the user's query operation for a series in the other series in the series list, based on the metadata of that series.
[0052] This invention loads data based on the hierarchical structure of DICOM, which helps to better organize and manage DICOM data. It allows medical imaging data to be organized and retrieved according to the hierarchical relationship of Patient, Study, Series, and Instance. Furthermore, after the metadata of the first series in the series list is obtained, the instance images of that first series are automatically loaded based on that metadata. After the metadata of the remaining series in the series list is obtained, they are not loaded temporarily. Loading only occurs when the user searches for a specific series in the remaining series (i.e., lazy loading). This enables on-demand loading, avoiding unnecessary resource consumption caused by traditional full loading, reducing network bandwidth and storage resource usage, and minimizing lag issues caused by the main thread handling too many tasks and the time users spend waiting for data to load.
[0053] In this embodiment, in response to a user's query for a specific DICOM file, a series list of the DICOM files is obtained, specifically including:
[0054] In response to a user's query for a specific DICOM file, generate a request to retrieve a series list of that DICOM file.
[0055] Based on the series list retrieval request for the DICOM file, obtain the series list of the DICOM file.
[0056] In this embodiment, the metadata of each series in the series list of the DICOM file is obtained based on the series list of the DICOM file, specifically including:
[0057] Based on the series list of the DICOM file, generate metadata retrieval requests for each series in the series list of the DICOM file;
[0058] Based on the metadata retrieval requests for each series in the series list that generated the DICOM file, retrieve the metadata for each series in the series list of the DICOM file.
[0059] In this embodiment, after the metadata of the remaining series in the series list is obtained, the instance image of that series is loaded only when the user queries a specific series in the remaining series in the series list, i.e., in response to the user's query operation for a specific series in the remaining series in the series list. Specifically, this includes:
[0060] After the metadata of the other series in the series list is obtained, an instance image loading request for that series is generated only when the user looks up a series in the other series in the series list, i.e., in response to the user's lookup operation for a series in the other series in the series list.
[0061] Generate an instance image loading request for the series based on the series' metadata, and load the instance images for the series.
[0062] To further reduce user waiting time for data loading and mitigate lag issues caused by the main thread handling too many tasks, this embodiment automatically loads instance images of the first series based on its metadata. Specifically, this includes:
[0063] Based on the metadata of the first series, automatically generate asynchronous image loading requests;
[0064] Based on the asynchronous image loading request, obtain the asynchronously loaded instance image;
[0065] Load the asynchronously loaded instance image.
[0066] Traditional image data loading executes all operations sequentially on a single main thread, failing to fully utilize the advantages of multi-core CPUs and resulting in low processing efficiency. To address this issue, in a further embodiment, asynchronously loaded instance images are loaded, specifically including:
[0067] Concurrent loading of asynchronously loaded instance images.
[0068] This embodiment utilizes the concurrent request feature of the browser's WebWorker to concurrently load asynchronously loaded instance images, which can further optimize the data loading method. While ensuring high-performance loading of image data, it can also reduce the resource waste caused by full data loading, greatly reduce the time users wait for data loading, and further avoid the lag problem caused by the main thread handling too many tasks.
[0069] This invention also proposes a lazy loading system for image data based on WebWorker, comprising:
[0070] Data acquisition module and data lazy loading module;
[0071] The data acquisition module is used to retrieve a series list of DICOM files in response to a user's query operation for a specific DICOM file;
[0072] Based on the series list in the DICOM file, retrieve the metadata of each series in the series list of the DICOM file;
[0073] The data lazy loading module is used to automatically load the instance image of the first series after the metadata of the first series in the series list has been obtained, based on the metadata of the first series.
[0074] It is also used to load the instance image of a series based on the metadata of the series only when the user queries a series among the remaining series in the series list, i.e., in response to the user's query operation for a series among the remaining series in the series list.
[0075] This invention enables data loading based on the hierarchical structure of DICOM, facilitating better organization and management of DICOM data. It allows medical imaging data to be organized and retrieved according to the hierarchical relationships of Patient, Study, Series, and Instance. Furthermore, after the metadata of the first series in the series list is obtained, instance images of that first series are automatically loaded based on that metadata. After the metadata of the remaining series in the series list is obtained, loading is not performed until the user searches for a specific series within the list. This on-demand loading avoids unnecessary resource consumption caused by traditional full loading, reduces network bandwidth and storage resource usage, and minimizes lag issues caused by the main thread handling too many tasks and reduces user waiting time for data loading.
[0076] Specifically, the data acquisition module is a DICOMweb request module, which has QIDO (image data query) and WADO (image data loading) interfaces based on the standard DICOMweb.
[0077] In this embodiment, the data lazy loading module is also used to generate a series list retrieval request for the DICOM file in response to a user's operation to view a certain DICOM file;
[0078] The data acquisition module is used to obtain the series list of the DICOM file based on the series list acquisition request of the DICOM file.
[0079] In a further embodiment, the data lazy loading module is also used to generate metadata retrieval requests for each series in the series list of the DICOM file based on the series list of the DICOM file;
[0080] The data acquisition module is also used to acquire the metadata of each series in the series list of the DICOM file based on the metadata acquisition request of each series in the series list of the DICOM file.
[0081] In a further embodiment, the data lazy loading module is also used to generate an instance image loading request for a series based on the metadata of the series only when the user queries a series among the remaining series in the series list, i.e., in response to the user's query operation for a series among the remaining series in the series list, after the metadata of the other series in the series list has been obtained.
[0082] And load the instance images for that series based on the instance image loading request for that series.
[0083] In this embodiment, the data lazy loading module is used to automatically load the instance image of the first series after the metadata of the first series in the series list is obtained, based on the metadata of the first series. Specifically, it includes:
[0084] The data lazy loading module is used to automatically generate asynchronous image loading requests based on the metadata of the first series;
[0085] The data acquisition module is used to obtain asynchronously loaded instance images based on the asynchronous image loading request;
[0086] The data lazy loading module is also used to load asynchronously loaded instance images.
[0087] In this embodiment, a WebWorker control loading module is also included;
[0088] The data lazy loading module is also used to load asynchronously loaded instance images, specifically including:
[0089] The data lazy loading module is also used to concurrently load asynchronously loaded instance images by calling the WebWorker control loading module.
[0090] Specifically, the WebWorker control loading module adapts to the standard object storage interface, enabling interface-based storage of image data files in object storage. The data lazy loading module, by calling the WebWorker control loading module, can concurrently load asynchronously loaded instance images. This ensures high-performance loading of image data while reducing resource waste caused by full data loading, significantly reducing user waiting time for data loading and further avoiding stuttering issues caused by the main thread handling too many tasks.
[0091] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A lazy loading method for image data based on WebWorker, characterized in that, include: In response to a user's query for a DICOM file, generate a request to retrieve the series list of the DICOM file; and retrieve the series list of the DICOM file based on the request. Based on the series list of the DICOM file, generate metadata retrieval requests for each series in the series list of the DICOM file; based on the metadata retrieval requests for each series in the series list of the DICOM file, retrieve the metadata for each series in the series list of the DICOM file. Specifically, after the metadata of the first series in the series list is obtained, an asynchronous image loading request is automatically generated based on the metadata of the first series; based on the asynchronous image loading request, the asynchronously loaded instance image is obtained; and the asynchronously loaded instance image is loaded concurrently. After the metadata of the remaining series in the series list has been retrieved, the instance image of that series is loaded only in response to a user's query operation on a particular series in the remaining series in the series list, based on the metadata of that series.
2. The lazy loading method for image data based on WebWorker according to claim 1, characterized in that, After the metadata of the remaining series in the series list has been retrieved, the instance image of that series is loaded only in response to a user's query operation on a particular series in the remaining series in the series list, based on the metadata of that series. Specifically, this includes: After the metadata of the remaining series in the series list has been obtained, an instance image loading request for that series is generated only in response to a user's query operation on a particular series in the remaining series in the series list, based on the metadata of that series. Generate an instance image loading request for the series based on the series' metadata, and load the instance images for the series.
3. A lazy loading system for image data based on WebWorker, characterized in that, include: Data acquisition module, WebWorker control loading module, and data lazy loading module; The data acquisition module is used to respond to a user's query operation for a DICOM file by generating a series list acquisition request for the DICOM file; acquiring the series list of the DICOM file based on the series list acquisition request; generating metadata acquisition requests for each series in the series list of the DICOM file based on the series list of the DICOM file; and acquiring the metadata of each series in the series list of the DICOM file based on the metadata acquisition requests for each series in the series list of the DICOM file. The data lazy loading module is used to automatically generate an asynchronous image loading request based on the metadata of the first series in the series list after the metadata of the first series is obtained. The data acquisition module is also used to obtain asynchronously loaded instance images based on the asynchronous image loading request; The data lazy loading module is also used to concurrently load asynchronously loaded instance images by calling WebWorker to control the loading module; The data lazy loading module is also used to load the instance image of a series only in response to a user's query operation on a particular series in the series list, after the metadata of the other series in the series list has been retrieved.
4. The image data lazy loading system based on WebWorker according to claim 3, characterized in that, The data lazy loading module is also used to generate an instance image loading request for a series based on the metadata of the series only when the user queries a series in the series list after the metadata of the other series in the series list has been obtained. And load the instance images for that series based on the instance image loading request for that series.
Citation Information
Patent Citations
Method and equipment for preloading DICOM image
CN110310724A