Data storage method and device, storage medium and equipment
By merging and storing pixel values and masks for medical image data pixels, the problems of wasted storage space and low data processing efficiency are solved, achieving more efficient storage and processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING WANDONG MEDICAL TECH CO LTD
- Filing Date
- 2025-12-02
- Publication Date
- 2026-04-21
AI Technical Summary
Existing technologies for storing medical image data, especially high-resolution volume data, suffer from problems of wasted storage space and low data processing efficiency, mainly due to the excessive storage space allocated to each pixel and the separate storage of the mask.
By allocating a preset number of bits of storage space to the pixels of the image data acquisition device, the pixel value is stored in the first field of the storage space, and the mask is stored in the second field, ensuring that the two are stored together, reducing the need to allocate storage space separately for the mask.
It improves storage space utilization and data processing efficiency, reduces storage space waste, and enhances the flexibility and privacy of data storage.
Smart Images

Figure CN121901439A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of medical image data storage technology, and more specifically, to a data storage method, apparatus, storage medium and device in the field of medical image data storage technology. Background Technology
[0002] Medical imaging technology plays an increasingly important role in clinical diagnosis and treatment planning. Among these technologies, cone-beam computed tomography (CBCT), computed tomography (CT), and magnetic resonance imaging (MRI) can generate high-resolution volumetric data. However, for volumetric data containing numerous slices, these technologies typically generate multiple independent files to store the data. Within each independent file, only two bytes of storage space are allocated for each pixel in the volumetric data, resulting in significant storage waste and reduced data processing efficiency. Summary of the Invention
[0003] This application provides a data storage method, apparatus, storage medium, and device, which can improve the utilization rate of storage space and the efficiency of data processing.
[0004] In a first aspect, a data storage method is provided, comprising: acquiring multiple consecutive pixel layer data corresponding to human body parts acquired by an image data acquisition device, and identification information corresponding to each pixel layer data, wherein the pixel layer data consists of multiple pixels; generating a pixel image corresponding to each pixel layer data based on the multiple pixels corresponding to each pixel layer data and the identification information; determining a target file based on the generated multiple consecutive pixel images; allocating a storage space with a preset number of bits for a target pixel in the target file, wherein the target pixel is any pixel in each pixel image; storing the pixel value of the target pixel in a first field of the storage space, storing the mask of the target pixel in a second field of the storage space, wherein the sum of the first bit of the first field and the second bit of the second field is less than or equal to the preset number of bits, and the most significant bit of the first field is lower than the least significant bit of the second field.
[0005] The above technical solution allocates storage space for each pixel in the target file. After storing the pixel value in the first field of the storage space, the pixel mask is stored in the second field after the first field. There is no need to allocate storage space for the mask separately, which improves the utilization of storage space and data processing efficiency.
[0006] In conjunction with the first aspect, in some possible implementations, after the step of acquiring multiple consecutive pixel layer data corresponding to human body parts collected by the image data acquisition device, and the identification information corresponding to each pixel layer data, the method further includes: performing three-dimensional reconstruction on each pixel layer data based on multiple consecutive pixel layer data and identification information to obtain a three-dimensional model corresponding to the human body part; determining the target sub-part of each pixel point in the human body part, and the spatial geometric parameters of each sub-part in the human body part based on the three-dimensional model; and determining the mask of each pixel point based on the target sub-part.
[0007] Combining the first aspect and the above implementation methods, in some possible implementation methods, after the step of generating pixel images corresponding to each pixel layer data based on multiple pixels and identification information corresponding to each pixel layer data, and determining the target file based on the generated multiple consecutive pixel images, the method further includes: obtaining common description information of each pixel image from the target pixel image; obtaining target sequence description parameters of the target pixel image in multiple consecutive pixel images, wherein the target pixel image is any pixel image in multiple consecutive pixel images; determining sequence parameter rules of multiple consecutive pixel images based on the target sequence description parameters; determining the file header information of the target file based on the common description information, the target sequence description parameters, and the sequence parameter rules; and storing the file header information in the target file.
[0008] In combination with the first aspect and the above implementation methods, in some possible implementation methods, the step of storing the file header information in the target file includes: if the target file is a file based on a standard protocol, then storing the file header information in a public field of the target file.
[0009] In combination with the first aspect and the above implementation methods, in some possible implementation methods, after the step of generating pixel images corresponding to each pixel layer data based on multiple pixel points and identification information corresponding to each pixel layer data, and determining the target file based on the generated multiple consecutive pixel images, the method further includes: storing spatial geometric parameters in the target file.
[0010] In combination with the first aspect and the above implementation methods, in some possible implementation methods, the step of storing spatial geometry parameters in the target file includes: if the target file is a file based on a standard protocol, then storing the spatial geometry parameters in a private field of the target file.
[0011] In conjunction with the first aspect, in some possible implementations, the step of allocating a preset number of bits of storage space for the target pixel in the target file includes: if the target file is a file based on a standard protocol, then allocating a preset number of bits of storage space for the target pixel in the public fields of the target file.
[0012] Secondly, a data storage device is provided, the device comprising: The data acquisition unit is used to acquire multiple consecutive pixel layer data corresponding to human body parts acquired by the image data acquisition device, as well as the identification information corresponding to each pixel layer data. The pixel layer data consists of multiple pixels. The image generation unit is used to generate pixel images corresponding to each pixel layer data based on multiple pixels and identification information corresponding to each pixel layer data, and to determine the target file based on the multiple consecutive pixel images generated. The storage space allocation unit is used to allocate a preset number of bits of storage space for the target pixel in the target file. The target pixel is any pixel in the pixel image. The pixel data storage unit is used to store the pixel value of the target pixel in the first field of the storage space and the mask of the target pixel in the second field of the storage space. The sum of the first bit of the first field and the second bit of the second field is less than or equal to a preset number of bits, and the highest bit of the first field is lower than the lowest bit of the second field.
[0013] Thirdly, a computer device is provided, the computer device comprising: a memory for storing executable program code; A processor for calling and running executable program code from memory to perform the methods in the first aspect or any possible implementation of the first aspect described above.
[0014] Fourthly, a computer program product is provided, comprising: computer program code, which, when run on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof.
[0015] Fifthly, a computer-readable storage medium is provided that stores computer program code, which, when executed on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof. Attached Figure Description
[0016] Figure 1 This is a schematic diagram illustrating a data storage method provided in an embodiment of this application. Figure 2 This is a flowchart illustrating a data storage method provided in an embodiment of this application; Figure 3 A schematic diagram illustrating an example of data storage provided in an embodiment of this application; Figure 4 This is a flowchart illustrating a data storage method provided in an embodiment of this application; Figure 5This is a schematic diagram of the structure of a data storage device provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0017] The technical solutions in this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. "And / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.
[0018] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.
[0019] Please see Figure 1 , Figure 1 This is a schematic diagram illustrating a data storage method provided in an embodiment of this application. For example... Figure 1 As shown, the data storage method provided in this application embodiment is applicable to image data storage scenarios. Image data includes human body data, a mask for the body data, and the human body structure presented by the body data. Body data refers to human body data acquired in the medical field through image data acquisition devices such as CBCT, CT, and MRI. Body data consists of continuous pixel layer data, with each pixel layer containing multiple pixels. To store body data, a separate file corresponding to each pixel layer is typically generated, and multiple separate files form a target file. In the target file, the pixel value corresponding to each pixel in the pixel image occupies two bytes of storage space, with each byte containing 8 bits, for a total of 16 bits. However, each pixel value requires a maximum of 12 bits of storage space, resulting in at least 4 bits of wasted storage space per pixel in each separate file when storing body data. Furthermore, to distinguish the human body part corresponding to each pixel, the image data also needs to use a mask to label the corresponding human body part. Since the mask is stored separately from the pixel, mask storage also requires a certain amount of storage space.
[0020] In this embodiment, multiple consecutive pixel layer data and the corresponding identification information of each pixel layer data are obtained. Based on the multiple pixels corresponding to each pixel layer data and the identification information, a pixel image corresponding to each pixel data is generated. Then, a target file is determined based on the generated multiple consecutive pixel images. Storage space is allocated for each pixel in the target file. After storing the pixel value of the pixel in the first field of the storage space, the mask of the pixel is stored in the second field after the first field. There is no need to allocate storage space for the mask separately, which improves the utilization rate of storage space and data processing efficiency.
[0021] based on Figure 1 The scene diagram shown below will be combined with... Figures 2-4 The data storage method provided in the embodiments of this application will be described in detail.
[0022] Please see Figure 2 , Figure 2 This is a flowchart illustrating a data storage method provided in an embodiment of this application. Figure 2 As shown, the method in this application embodiment may include the following steps S101-S104.
[0023] S101, acquire multiple consecutive pixel layer data corresponding to human body parts acquired by the image data acquisition device, as well as the identification information corresponding to each pixel layer data. The pixel layer data consists of multiple pixels. Specifically, the imaging data acquisition device acquires volume data corresponding to human body parts and corresponding identification information. Volume data consists of multiple consecutive pixel layers. After acquiring the volume data, the imaging data acquisition device generates a volume data file and an identification file that identifies the volume data information. Multiple consecutive pixel layers are obtained from the volume data file. Each pixel layer consists of multiple pixels, and the pixel value corresponds to the attenuation level of the area where the pixel is located after scanning by the imaging data acquisition device. Different densities of objects have different attenuation levels, thus this can be used to distinguish human body parts. Identification information corresponding to each pixel layer is obtained from the identification file. This identification information describes the volume data and includes patient identification information, image width and height of the pixel layer data, number of slices, and slice thickness.
[0024] Among them, patient identification information is used to identify the patient to whom the volume data belongs; each pixel layer data is regarded as two-dimensional cross-sectional data, and the image width and height are used to describe how many rows and columns of pixel values are included in each two-dimensional cross-section; the number of cross-sections is used to describe the number of pixel layer data in the volume data; and the layer thickness is used to describe the actual physical thickness of the human tissue represented by each two-dimensional cross-section.
[0025] S102, Generate pixel images corresponding to each pixel layer data based on multiple pixels and identification information corresponding to each pixel layer data, and determine the target file based on the generated multiple consecutive pixel images; Specifically, multiple pixels corresponding to each pixel layer data are combined with identification information to generate pixel images corresponding to each pixel layer data. Pixel images generated from consecutive pixel layer data are also consecutive, and these consecutive pixel images form the target file. In the target file, the identification information in each pixel image is common descriptive information describing each pixel image. In addition to the common descriptive information, the pixel image also includes sequence description parameters. Continuous pixel images are considered as a sequence, and the sequence description parameters include, but are not limited to, the sequence number and location of the pixel image in the sequence. Taking the sequence number as an example, the sequence number of the first pixel image in a sequence is 1. Starting from 1, the sequence number of subsequent pixel images is obtained by incrementing by 1 according to the number of pixel images in the sequence.
[0026] S103, allocate a storage space of a preset number of bits for the target pixel in the target file, where the target pixel is any pixel in the pixel image; Specifically, storage space is reallocated for each pixel in the target file. For example, in the medical field, 12 bits can cover the attenuation of human tissue under the scanning of image data acquisition equipment. Therefore, storing the pixel value of a pixel requires a maximum of 12 bits, which requires 2 bytes of storage space, or 16 bits. It should be noted that when allocating storage space for pixels, the storage space is allocated according to the order of the pixel image in the sequence and the row and column of each pixel in the pixel image.
[0027] In this embodiment, pixels in a pixel image are stored separately from other descriptive information. The descriptive information is stored as the header information of the target file. Since the common descriptive information in each pixel image is the same, a target pixel image is randomly selected from the sequence of pixel images. The common descriptive information in the target pixel image is extracted, and the target sequence description parameters of the target pixel image in the sequence are obtained. Sequence parameter rules are determined, which are used to define the sequence description parameters of each pixel image so that the pixel image to which each pixel belongs can be determined when reading the target file. Taking the sequence number as an example, if the target sequence number of the target pixel image is 1, the sequence parameter rule is to start from 1 and increment by 1 according to the number of pixel images in the sequence to obtain the sequence number of the subsequent pixel images. Then, when a pixel is read, the sequence number of the pixel image to which the read pixel belongs can be determined according to the position of the pixel and the number of pixels in a single frame pixel image.
[0028] S104, store the pixel value of the target pixel in the first field of the storage space, and store the mask of the target pixel in the second field of the storage space.
[0029] Specifically, the pixel value of each pixel is stored in the first field of the storage space allocated to it, and the mask of each pixel is stored in the second field of the storage space. The sum of the first digit of the first field and the second digit of the second field is less than or equal to a preset number of digits, and the highest digit of the first field is lower than the lowest digit of the second field.
[0030] For example, 16 bits (2 bytes) of storage space are allocated to each pixel, but the pixel value occupies a maximum of 12 bits. For each pixel, this will result in at least 4 bits of wasted space. The mask for each pixel also needs storage space. The mask is used to identify the sub-part of the human body corresponding to each pixel. If the human body part scanned by the image data acquisition device is the entire spine, the entire spine includes three bones: the spine, pelvis, and femoral head. These three bones are the sub-parts of the entire spine. The mask for each pixel can be represented by 0-3. 0b00 indicates that the pixel is a non-skeletal part, 0b01 indicates that the pixel is the spine, 0b10 indicates that the pixel is the pelvis, and 0b11 indicates that the pixel is the femoral head. 2 bits can encode the four numbers 00, 01, 10, and 11 in binary. Therefore, the storage space occupied by the mask corresponding to the entire spine is 2 bits. The mask can be stored in the second field after the first field corresponding to the pixel value in the storage space allocated to the pixel. Computer devices read data starting from the least significant bit. If the mask is stored in 1-2 bits and the pixel value is stored in 3-14 bits, it will affect the reading of the pixel value.
[0031] Please see Figure 3 , Figure 3 This is an example diagram illustrating data storage provided in an embodiment of this application, such as... Figure 3 As shown, assuming the pixel value of the target pixel is 156HU, the binary representation of 156 is 10011100, and the mask of the target pixel is 0b11, the pixel value and the mask are stored in two bytes. Since the order of the low-order bits to the high-order bits in the storage space is from right to left, the final storage result is 1100000010011100.
[0032] In this embodiment, multiple consecutive pixel layer data and the corresponding identification information of each pixel layer data are obtained. Based on the multiple pixels corresponding to each pixel layer data and the identification information, a pixel image corresponding to each pixel data is generated. Then, a target file is determined based on the generated multiple consecutive pixel images. Storage space is allocated for each pixel in the target file. After storing the pixel value of the pixel in the first field of the storage space, the mask of the pixel is stored in the second field after the first field. There is no need to allocate storage space for the mask separately, which improves the utilization rate of storage space and data processing efficiency.
[0033] Please see Figure 4 , Figure 4 This is a flowchart illustrating a data storage method provided in an embodiment of this application. Figure 4 As shown, the method in this application embodiment may include the following steps S201-S210.
[0034] S201, acquire multiple consecutive pixel layer data corresponding to human body parts acquired by the image data acquisition device, as well as the identification information corresponding to each pixel layer data. The pixel layer data consists of multiple pixels. Specifically, the imaging data acquisition device acquires volume data corresponding to human body parts and corresponding identification information. Volume data consists of multiple consecutive pixel layers. After acquiring the volume data, the imaging data acquisition device generates a volume data file and an identification file that identifies the volume data information. Multiple consecutive pixel layers are obtained from the volume data file. Each pixel layer consists of multiple pixels, and the pixel value corresponds to the degree of attenuation of the area where the pixel is located after scanning by the imaging data acquisition device. Different densities of objects have different attenuation levels, which can be used to distinguish human body parts. Identification information corresponding to each pixel layer is obtained from the identification file. This identification information describes the volume data and includes patient identification information, image width and height of the pixel layer data, number of slices, and slice thickness.
[0035] Among them, patient identification information is used to identify the patient to whom the volume data belongs; each pixel layer data is regarded as two-dimensional cross-sectional data, and the image width and height are used to describe how many rows and columns of pixel values are included in each two-dimensional cross-section; the number of cross-sections is used to describe the number of pixel layer data in the volume data; and the layer thickness is used to describe the actual physical thickness of the human tissue represented by each two-dimensional cross-section.
[0036] S202, based on multiple consecutive pixel layer data and identification information, performs three-dimensional reconstruction on each pixel layer data to obtain a three-dimensional model corresponding to the human body part; Specifically, 3D reconstruction is performed on multiple consecutive pixel layers of data to establish a spatial coordinate system. The position of each pixel in each pixel layer is determined based on geometric parameters such as layer thickness in the identification information, resulting in a 3D model corresponding to the human body part acquired by the image data acquisition device. 3D reconstruction fuses discrete 2D cross-sections into a continuous 3D anatomical structure, which is used to analyze the spatial morphology and interrelationships of various sub-parts within the human body to determine whether a disease has developed.
[0037] S203, based on the 3D model, determine the target sub-part of each pixel in the human body part, and the spatial geometric parameters of each sub-part in the human body part, and determine the mask of each pixel based on the target sub-part; Specifically, based on the position of each pixel in the 3D model, the target sub-parts of each pixel within the human body are determined, and the masks of each pixel are determined based on the target sub-parts. Simultaneously, spatial geometric analysis is performed on the 3D model to determine the spatial geometric parameters of each sub-part within the human body. These spatial geometric parameters include the distances and angles between sub-parts, as well as the individual sizes of the sub-parts, which are used to determine whether the human body has developed a disease and, if so, its location.
[0038] For example, if the image data acquisition device scans the entire spine of the human body under load, and the entire spine includes the spine, pelvis, and femoral head (these three bones are sub-parts of the entire spine), then there are four types of pixel masks, which can be represented by 0-3: 0b00 indicates that the pixel is not a skeletal part, 0b01 indicates that the pixel is the spine, 0b10 indicates that the pixel is the pelvis, and 0b11 indicates that the pixel is the femoral head. Scanning the entire spine under load requires analyzing the patient's condition based on spatial geometric parameters such as the spinal tilt angle and pelvic tilt angle.
[0039] S204, Generate pixel images corresponding to each pixel layer data based on multiple pixels and identification information corresponding to each pixel layer data, and determine the target file based on the generated multiple consecutive pixel images; Specifically, multiple pixels corresponding to each pixel layer data are combined with identification information to generate pixel images corresponding to each pixel layer data. Pixel images generated from consecutive pixel layer data are also consecutive, and these consecutive pixel images form the target file. In the target file, the identification information in each pixel image is common descriptive information describing each pixel image. In addition to the common descriptive information, the pixel image also includes sequence description parameters. Continuous pixel images are considered as a sequence, and the sequence description parameters include, but are not limited to, the sequence number and location of the pixel image in the sequence. Taking the sequence number as an example, the sequence number of the first pixel image in a sequence is 1. Starting from 1, the sequence number of subsequent pixel images is obtained by incrementing by 1 according to the number of pixel images in the sequence.
[0040] It should be noted that the pixel images generated in this application embodiment are based on proprietary protocols or standard protocols. Proprietary protocols are custom protocols defined by the manufacturers of image data acquisition equipment. Pixel images and target files generated through proprietary protocols cannot be read by other manufacturers, thus providing high privacy. Standard protocols are common protocols in the field of medical imaging, such as the Digital Imaging and Communications in Medicine (DICOM) protocol. The DICOM protocol specifies how medical images and related information should be digitized, stored, transmitted, displayed, and printed, ensuring seamless exchange and understanding of medical image data between different manufacturers, hospitals, and software, thereby improving data interoperability.
[0041] S205, obtain the common description information of each pixel image from the target pixel image, and obtain the target sequence description parameters of the target pixel image in multiple consecutive pixel images; Specifically, one pixel image is randomly selected from multiple consecutive pixel images as the target pixel image. Common descriptive information of all pixel images is obtained from the target pixel image, along with target sequence descriptive parameters of the target pixel image within the multiple consecutive pixel images. The common descriptive information consists of information identical across all pixel images. Consecutive pixel images are considered a sequence, and the sequence descriptive parameters include, but are not limited to, the pixel image's index and location within the sequence. For example, the first frame pixel image in a sequence might have index 1, and the second frame pixel image might have index 2.
[0042] It should be noted that the pixel image should also include the interlayer spacing, which describes the physical distance between two adjacent frames. The sequence description parameters in this embodiment include layer positioning, which determines the interlayer spacing. Layer positioning is metadata describing the absolute position and orientation of each pixel image in three-dimensional space. Layer positioning is a set of spatial coordinates and orientation vectors. The interlayer spacing between two pixel images can be obtained by calculating the distance between two coordinate points in two frames based on the spatial coordinates and orientation vectors. Therefore, when obtaining the layer positioning in the sequence description parameters, it is necessary to obtain two adjacent pixel images as the target pixel images.
[0043] S206, Determine the sequence parameter rules for multiple consecutive pixel images based on the target sequence description parameters; Specifically, sequence parameter rules for multiple consecutive pixel images are determined based on the target sequence description parameters. For example, when the sequence description parameter is a sequence number, if the target sequence number of the target pixel image is 1, the sequence parameter rule starts from 1 and increments by 1 sequentially based on the number of pixel images in the sequence to obtain the sequence number of subsequent pixel images. Therefore, when a pixel is read, the sequence number of the pixel image containing the read pixel can be determined based on the pixel's location and the number of pixels in a single frame. When the sequence description parameter is a layer location, the layer location of two adjacent target pixel images is obtained. The sequence parameter rule is to obtain the difference between the layer locations of the two target pixel images, and this difference is determined as the layer spacing between any pixel image and the preceding pixel image in multiple consecutive pixel images. Since the image data acquisition device performs uniform scanning when scanning human body parts, the layer spacing between any two adjacent pixel images is the same.
[0044] S207, Based on the common description information, target sequence description parameters, and sequence parameter rules, determine the file header information of the target file and store the file header information in the target file; Specifically, the common description information, target sequence description parameters, and sequence parameter rules are stored as the header information of the target file. If the target file is based on a proprietary protocol, the header information is stored in a private field of the target file and cannot be read by other vendors or hospitals.
[0045] In one feasible implementation, if the target file is a file based on a standard protocol, the file header information is stored in the public fields of the target file. Common medical image reading software can parse the target file according to the standard protocol and read the information in the public fields.
[0046] S208, Allocate a storage space of a preset number of bits for the target pixel in the target file. The target pixel is any pixel in each pixel image. Specifically, in this embodiment, common description information and sequence description parameters are stored separately as file header information. Following the file header information, the pixels in the pixel image are stored consecutively as a sequence. Storage space is reallocated for each pixel in the target file. For example, in the medical field, 12 bits can cover the attenuation of human tissue under scanning by an image data acquisition device. Therefore, storing the pixel value requires 12 bits, requiring 2 bytes of storage space, i.e., 16 bits. It should be noted that when allocating storage space for pixels, storage space is allocated according to the order of the pixel image in the sequence and the row and column of each pixel in the pixel image.
[0047] In one feasible implementation, if the target file is a file based on a private protocol, then a storage space of a preset number of bits is allocated for the target pixels in the private field of the target file; if the target file is a file based on a standard protocol, then a storage space of a preset number of bits is allocated for the target pixels in the public field of the target file.
[0048] S209, store the pixel value of the target pixel in the first field of the storage space, and store the mask of the target pixel in the second field of the storage space; Specifically, the pixel value of each pixel is stored in the first field of the storage space allocated to it, and the mask of each pixel is stored in the second field of the storage space. The sum of the first digit of the first field and the second digit of the second field is less than or equal to a preset number of digits, and the highest digit of the first field is lower than the lowest digit of the second field.
[0049] For example, 16 bits (2 bytes) of storage space are allocated to each pixel, but the pixel value only occupies 12 bits. This results in a 4-bit waste of space for each pixel. The mask for each pixel also requires storage space. The mask is used to identify the sub-part of the human body corresponding to each pixel. If the human body scanned by the image data acquisition device is the entire spine, which includes the spine, pelvis, and femoral head, these three bones are the sub-parts of the entire spine. Therefore, the mask for each pixel can be represented by 0-3: 0b00 indicates that the pixel is a non-skeletal part, 0b01 indicates that the pixel is the spine, 0b10 indicates that the pixel is the pelvis, and 0b11 indicates that the pixel is the femoral head. 2 bits can encode the four binary numbers 00, 01, 10, and 11. Therefore, the mask corresponding to the entire spine occupies 2 bits of storage space. The mask can be stored in the second field after the first field corresponding to the pixel value within the storage space allocated to the pixel. Computer devices read data starting from the least significant bit. If the mask is stored in 1-2 bits and the pixel value in 3-14 bits, it will affect the reading of the pixel value. See the example diagram for data storage. Figure 3 .
[0050] S210 stores the spatial geometry parameters in the target file.
[0051] In one feasible implementation, if the target file is a file based on a private protocol, the spatial geometry parameters are stored in the private fields of the target file; if the target file is a file based on a standard protocol, the spatial geometry parameters are stored in the private fields of the target file.
[0052] In this embodiment, multiple consecutive pixel layer data and corresponding identifier information are acquired. A pixel image corresponding to each pixel data is generated based on the multiple pixels corresponding to each pixel layer data and the identifier information. Then, a target file is determined based on the generated multiple consecutive pixel images. Storage space is allocated for each pixel in the target file. After storing the pixel value in the first field of the storage space, the pixel mask is stored in the second field after the first field. This eliminates the need to allocate separate storage space for the mask, improving storage space utilization and data processing efficiency. When the target file is based on a standard protocol, the file header information and pixel information are stored in public fields, while spatial geometry information is stored in private fields. This improves the flexibility and integrity of data storage, ensuring the commonality of file header information and pixel information, as well as the privacy of derived data such as spatial geometry information.
[0053] based on Figure 1 The following is a scene illustration, which will be combined with... Figure 5 This application provides a detailed description of the data storage device provided in its embodiments. It should be noted that... Figure 5 The data storage device in the middle is used to execute this application. Figures 2-4 The methods shown in the embodiments are for illustrative purposes only, illustrating the parts relevant to the embodiments of this application. For specific technical details not disclosed, please refer to this application. Figures 2-4 The example shown.
[0054] Please see Figure 5 , Figure 5 This is a schematic diagram of the structure of a data storage device provided in an embodiment of this application. Figure 5 As shown, the data storage device 1 in this application embodiment may include: a data acquisition unit 11, an image generation unit 12, a storage space allocation unit 13, and a pixel data storage unit 14.
[0055] The data acquisition unit 11 is used to acquire multiple consecutive pixel layer data corresponding to human body parts acquired by the image data acquisition device, as well as the identification information corresponding to each pixel layer data. The pixel layer data consists of multiple pixels. The image generation unit 12 is used to generate pixel images corresponding to each pixel layer data based on multiple pixels and identification information corresponding to each pixel layer data, and to determine the target file based on the generated multiple consecutive pixel images. The storage space allocation unit 13 is used to allocate a preset number of bits of storage space for the target pixel in the target file, where the target pixel is any pixel in each pixel image; The pixel data storage unit 14 is used to store the pixel value of the target pixel in the first field of the storage space and store the mask of the target pixel in the second field of the storage space. The sum of the first bit of the first field and the second bit of the second field is less than or equal to a preset number of bits, and the highest bit of the first field is lower than the lowest bit of the second field.
[0056] Optionally, the data storage device 1 also includes a three-dimensional reconstruction unit; The 3D reconstruction unit is used to perform 3D reconstruction on each pixel layer data based on multiple consecutive pixel layer data and identification information to obtain the 3D model corresponding to the human body part. Based on the 3D model, the target sub-parts of each pixel in the human body are determined, as well as the spatial geometric parameters of each sub-part in the human body. The mask for each pixel is determined based on the target sub-region.
[0057] Optionally, the data storage device 1 further includes a header information determination unit; The head information determination unit is used to obtain the common description information of each pixel image from the target pixel image, and to obtain the target sequence description parameters of the target pixel image in multiple consecutive pixel images, wherein the target pixel image is any pixel image in multiple consecutive pixel images; Sequence parameter rules for multiple consecutive pixel images are determined based on target sequence description parameters; Based on shared description information, target sequence description parameters, and sequence parameter rules, determine the header information of the target file; Store the header information in the target file.
[0058] Optionally, the header information determination unit is specifically used to store the file header information in the public fields of the target file if the target file is a file based on a standard protocol.
[0059] Optionally, the data storage device 1 may further include a geometric parameter storage unit; The geometric parameter storage unit is used to store spatial geometric parameters in the target file.
[0060] Optionally, the geometry parameter storage unit is specifically used to store spatial geometry parameters in a private field of the target file if the target file is a file based on a standard protocol.
[0061] Optionally, the storage space allocation unit 13 is specifically used to allocate a preset number of bits of storage space for the target pixels in the public field of the target file if the target file is a file based on a standard protocol.
[0062] In this embodiment, multiple consecutive pixel layer data and corresponding identifier information are acquired. A pixel image corresponding to each pixel data is generated based on the multiple pixels corresponding to each pixel layer data and the identifier information. Then, a target file is determined based on the generated multiple consecutive pixel images. Storage space is allocated for each pixel in the target file. After storing the pixel value in the first field of the storage space, the pixel mask is stored in the second field after the first field. This eliminates the need to allocate separate storage space for the mask, improving storage space utilization and data processing efficiency. When the target file is based on a standard protocol, the file header information and pixel information are stored in public fields, while spatial geometry information is stored in private fields. This improves the flexibility and integrity of data storage, ensuring the commonality of file header information and pixel information, as well as the privacy of derived data such as spatial geometry information.
[0063] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application.
[0064] For example, such as Figure 6 As shown, the computer device 600 includes a processor 601 and a memory 602, wherein the processor 601 and the memory 602 are electrically connected.
[0065] Processor 601 is the control center of computer device 600 and may include one or more processing cores. Processor 601 connects to various parts of the computer device using various interfaces and lines. By running or calling computer programs stored in memory 602, and by calling data stored in memory 602, it executes various functions of the computer device and processes data, thereby providing overall control of computer device 600. Optionally, processor 601 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). Processor 601 may integrate one or more of the following: CPU, Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user page, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into processor 601 and may be implemented separately using a communication chip.
[0066] The memory 602 can be used to store software programs and modules. The processor 601 executes various functional applications and data processing by running the computer programs and modules stored in the memory 602. The memory 602 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, computer programs required for at least one function, etc.; the data storage area may store data created based on the use of the computer device 600, etc.
[0067] Furthermore, memory 602 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, memory 602 may also include a memory controller to provide processor 601 with access to memory 602.
[0068] In this embodiment, the processor 601 in the computer device 600 loads the instructions corresponding to the processes of one or more computer programs into the memory 602 according to the following steps, and the processor 601 runs the computer programs stored in the memory 602 to realize various functions, as follows: The image data acquisition device acquires multiple consecutive pixel layer data corresponding to human body parts, as well as the identification information corresponding to each pixel layer data. The pixel layer data consists of multiple pixels. Pixel images corresponding to each pixel layer are generated based on multiple pixels and identification information corresponding to each pixel layer data, and the target file is determined based on the multiple consecutive pixel images generated. Allocate a preset number of bits of storage space for the target pixel in the target file. The target pixel is any pixel in the pixel image. The pixel value of the target pixel is stored in the first field of the storage space, and the mask of the target pixel is stored in the second field of the storage space. The sum of the first digit of the first field and the second digit of the second field is less than or equal to the preset number of digits, and the highest digit of the first field is lower than the lowest digit of the second field.
[0069] Optionally, after executing the acquisition of multiple consecutive pixel layer data corresponding to the human body parts acquired by the image data acquisition device, and the identification information corresponding to each pixel layer data, the processor 601 further executes: Based on multiple consecutive pixel layer data and identification information, three-dimensional reconstruction is performed on each pixel layer data to obtain a three-dimensional model corresponding to the human body part. Based on the 3D model, the target sub-parts of each pixel in the human body are determined, as well as the spatial geometric parameters of each sub-part in the human body. The mask for each pixel is determined based on the target sub-region.
[0070] Optionally, after the processor 601 generates pixel images corresponding to each pixel layer based on multiple pixels and identification information corresponding to each pixel layer data, and determines the target file based on the generated multiple consecutive pixel images, it also executes: Obtain the common descriptive information of each pixel image from the target pixel image, and obtain the target sequence description parameters of the target pixel image in multiple consecutive pixel images. The target pixel image is any pixel image in multiple consecutive pixel images. Sequence parameter rules for multiple consecutive pixel images are determined based on target sequence description parameters; Based on shared description information, target sequence description parameters, and sequence parameter rules, determine the header information of the target file; Store the header information in the target file.
[0071] Optionally, when the processor 601 executes the step of storing the file header information in the target file, it specifically performs the following: If the target file is based on a standard protocol, the header information will be stored in the public fields of the target file.
[0072] Optionally, after the processor 601 generates pixel images corresponding to each pixel layer based on multiple pixels and identification information corresponding to each pixel layer data, and determines the target file based on the generated multiple consecutive pixel images, it also executes: Store the spatial geometry parameters in the target file.
[0073] Optionally, when the processor 601 executes the process of storing spatial geometry parameters in the object file, it specifically performs the following: If the target file is based on a standard protocol, the spatial geometry parameters are stored in the target file's private fields.
[0074] Optionally, when the processor 601 allocates storage space of a preset number of bits for the target pixels in the target file, it specifically performs the following: If the target file is a file based on a standard protocol, then a preset number of bits of storage space will be allocated for the target pixels in the public fields of the target file.
[0075] In this embodiment, multiple consecutive pixel layer data and corresponding identifier information are acquired. A pixel image corresponding to each pixel data is generated based on the multiple pixels corresponding to each pixel layer data and the identifier information. Then, a target file is determined based on the generated multiple consecutive pixel images. Storage space is allocated for each pixel in the target file. After storing the pixel value in the first field of the storage space, the pixel mask is stored in the second field after the first field. This eliminates the need to allocate separate storage space for the mask, improving storage space utilization and data processing efficiency. When the target file is based on a standard protocol, the file header information and pixel information are stored in public fields, while spatial geometry information is stored in private fields. This improves the flexibility and integrity of data storage, ensuring the commonality of file header information and pixel information, as well as the privacy of derived data such as spatial geometry information.
[0076] It should be understood that the apparatus provided in this application embodiment is used to execute the above-described data storage method, and therefore can achieve the same effect as the above-described implementation method.
[0077] When using integrated units, the device may include a processing module and a storage module. When applied to a computer device, the processing module can be used to control and manage the operations of the computer device. The storage module can be used to support the computer device in executing relevant program code, etc.
[0078] The processing module may be a processor or a controller, which can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor may also be a combination of functions that implement computing capabilities, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc., and the storage module may be a memory.
[0079] In addition, the device provided in this application embodiment may specifically be a chip, component or module. The chip may include a connected processor and a memory. The memory is used to store instructions. When the processor calls and executes the instructions, the chip can execute a data storage method provided in the above embodiment.
[0080] This application also provides a computer-readable storage medium storing computer program code. When the computer program code is run on a computer, the computer executes the aforementioned method steps to implement a data storage method provided in the above embodiments.
[0081] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement a data storage method provided in the above embodiment.
[0082] In this embodiment, the device, computer-readable storage medium, computer program product, or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0083] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0084] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0085] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A data storage method, characterized in that, The method includes: The image data acquisition device acquires multiple consecutive pixel layer data corresponding to human body parts, as well as the identification information corresponding to each pixel layer data, wherein the pixel layer data is composed of multiple pixels. Pixel images corresponding to each pixel layer data are generated based on multiple pixels corresponding to each pixel layer data and the identification information, and the target file is determined based on the multiple consecutive pixel images generated. In the target file, a storage space of a preset number of bits is allocated for the target pixel, where the target pixel is any pixel in each of the pixel images; The pixel value of the target pixel is stored in the first field of the storage space, and the mask of the target pixel is stored in the second field of the storage space. The sum of the first number of the first field and the second number of the second field is less than or equal to the preset number of numbers, and the highest bit of the first field is lower than the lowest bit of the second field.
2. The method according to claim 1, characterized in that, After acquiring multiple consecutive pixel layer data corresponding to human body parts collected by the image data acquisition device, and the identification information corresponding to each pixel layer data, the method further includes: Based on the multiple consecutive pixel layer data and the identification information, three-dimensional reconstruction is performed on each pixel layer data to obtain a three-dimensional model corresponding to the human body part. Based on the three-dimensional model, the target sub-parts of each pixel in the human body part are determined, as well as the spatial geometric parameters of each sub-part in the human body part; The mask for each pixel is determined based on the target sub-region.
3. The method according to claim 2, characterized in that, After generating pixel images corresponding to each pixel layer data based on multiple pixels corresponding to each pixel layer data and the identification information, and determining the target file based on the generated multiple consecutive pixel images, the method further includes: Obtain common description information of each pixel image from the target pixel image, and obtain the target sequence description parameters of the target pixel image in the plurality of consecutive pixel images, wherein the target pixel image is any pixel image in the plurality of consecutive pixel images; The sequence parameter rules for the plurality of consecutive pixel images are determined based on the target sequence description parameters; Based on the shared description information, the target sequence description parameters, and the sequence parameter rules, the file header information of the target file is determined; The header information is stored in the target file.
4. The method according to claim 3, characterized in that, The step of storing the file header information in the target file includes: If the target file is a file based on a standard protocol, then the file header information is stored in the public fields of the target file.
5. The method according to claim 3, characterized in that, After generating pixel images corresponding to each pixel layer data based on multiple pixels corresponding to each pixel layer data and the identification information, and determining the target file based on the generated multiple consecutive pixel images, the method further includes: The spatial geometry parameters are stored in the target file.
6. The method according to claim 5, characterized in that, The step of storing the spatial geometric parameters in the target file includes: If the target file is a file based on a standard protocol, then the spatial geometry parameters are stored in the private fields of the target file.
7. The method according to claim 1, characterized in that, The step of allocating a storage space of a preset number of bits for the target pixels in the target file includes: If the target file is a file based on a standard protocol, then a preset number of bits of storage space is allocated for the target pixels in the public fields of the target file.
8. A data storage device, characterized in that, The device includes: The data acquisition unit is used to acquire multiple consecutive pixel layer data corresponding to human body parts acquired by the image data acquisition device, as well as the identification information corresponding to each pixel layer data, wherein the pixel layer data is composed of multiple pixels. An image generation unit is used to generate a pixel image corresponding to each pixel layer data based on multiple pixels corresponding to each pixel layer data and the identification information, and to determine a target file based on the generated multiple consecutive pixel images; A storage space allocation unit is used to allocate a preset number of storage spaces for a target pixel in the target file, wherein the target pixel is any pixel in each pixel image; A pixel data storage unit is used to store the pixel value of the target pixel in a first field of the storage space and to store the mask of the target pixel in a second field of the storage space. The sum of the first bit of the first field and the second bit of the second field is less than or equal to the preset number of bits, and the highest bit of the first field is lower than the lowest bit of the second field.
9. A computer device, characterized in that, The computer device includes: Memory, used to store executable program code; A processor for calling and running the executable program code from the memory, causing the computer device to perform the method as described in any one of claims 1 to 7.
10. A computer program product, characterized in that, The computing program product includes: Computer program code, when executed, implements the method as described in any one of claims 1 to 7.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program code that, when executed, implements the method as described in any one of claims 1 to 7.