A database file recovery method, a file import method, an apparatus and a device
Patent Information
- Application Number
- CN202210737469.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-27
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2042-06-27
AI Technical Summary
用户在清理过程中会存在误删除的行为,误以为存储患者检查数据的某些文件没有作用,手动将其删除掉了;而这一行为会导致数据导入失败;使得用户需要重新从原先的超声机器上重新手动导出系统格式数据,存在数据已删除的风险且非常耗时
[0074] As can be seen, this invention, by utilizing preset filename identifiers, obtains and parses system format files in each object folder to acquire ultrasound examination feature information corresponding to each object folder. It can then use image-related data from the system format data to obtain the ultrasound examination feature information required to recover the database data storage file. This allows for the recovery of the database data storage file, enabling users to conveniently and efficiently recover accidentally deleted or erroneous database data storage files, thus improving the user experience. Furthermore, this invention also provides a file import method, a database file recovery device, a file import device, an apparatus, and a computer-readable storage medium, all possessing the aforementioned beneficial effects.
Smart Images

Figure CN117349248B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of ultrasound technology, and in particular to a method for recovering database files, a method for importing files, an apparatus, a device, and a computer-readable storage medium. Background Technology
[0002] To facilitate the transfer of patient examination data between ultrasound machines, the ultrasound machines provide a function to export patient examination data in a system format via external storage devices (such as USB flash drives). Users can export the patient examination data in this system format and import it onto another ultrasound machine. After successful import, the corresponding examination data can be viewed, or actions such as callbacks and measurements can be performed on the other machine.
[0003] Currently, the system format data exported from ultrasound machines to external storage devices includes various ultrasound data files. In practical use, some users use their USB drives for other purposes besides storing patient data, and they often clean up files on their USB drives. During this cleaning process, users may accidentally delete files, mistakenly believing that certain files storing patient examination data are no longer needed. This can cause data import failure, requiring users to manually export the system format data again from the original ultrasound machine, which carries the risk of data deletion and is very time-consuming.
[0004] Therefore, how to conveniently and efficiently recover accidentally deleted ultrasound data files and improve user experience is an urgent problem to be solved. Summary of the Invention
[0005] The purpose of this invention is to provide a method for recovering database files, a method for importing files, an apparatus, a device, and a computer-readable storage medium, so as to conveniently and efficiently recover accidentally deleted database data storage files and improve user experience.
[0006] To solve the above-mentioned technical problems, the present invention provides a method for recovering database files, comprising:
[0007] Get file recovery instructions;
[0008] In response to the file recovery command, the system format files in each object folder are obtained and parsed using a preset file name identifier to obtain the ultrasound examination feature information corresponding to each object folder; wherein, the object folder is used to store the ultrasound examination data generated by performing ultrasound examination on the ultrasound examination object in the form of system format files;
[0009] Based on the ultrasound examination feature information corresponding to each of the object folders, restore the database data storage file.
[0010] Optionally, the preset filename identifier includes a first filename suffix and a second filename suffix;
[0011] The process involves using preset filename identifiers to obtain and parse system format files in each object folder to acquire ultrasound examination feature information corresponding to each object folder, including:
[0012] Iterate through each of the object folders;
[0013] For the currently accessed object folder, obtain the first file in the system format file based on the first file name extension;
[0014] Parse the filename of the first file, and obtain the basic filename prefix configured for the current ultrasound examination based on the parsed filename;
[0015] Based on the base file name prefix and the second file name suffix, the second file in the system format file is obtained and parsed to obtain the ultrasound examination feature information corresponding to the current object folder.
[0016] Optionally, the ultrasound examination feature information includes the ultrasound image type;
[0017] The step involves obtaining and parsing the second file in the system format file based on the base file name prefix and the second file name suffix to obtain the ultrasound examination feature information corresponding to the current object folder, including:
[0018] Based on the basic file name prefix and the preset subtitle file name suffix in the second file name suffix, the first file path is obtained by combining them. Then, it is determined whether there is an image type file that matches the first file path in the system format file corresponding to the current object folder.
[0019] If it exists, parse the image type file to obtain the ultrasound image type corresponding to the current object folder;
[0020] If it does not exist, it indicates that the system format file corresponding to the current object folder is missing.
[0021] Optionally, the ultrasound examination feature information includes clinical application feature information;
[0022] The step involves obtaining and parsing the second file in the system format file based on the base file name prefix and the second file name suffix to obtain the ultrasound examination feature information corresponding to the current object folder, including:
[0023] The second file path is obtained by combining the basic file name prefix and the preset medical digital imaging and communication file name suffix in the second file name suffix. It is then determined whether there is a clinical application feature file that matches the second file path in the system format file corresponding to the current object folder.
[0024] If not, then the clinical application feature information corresponding to the current object folder is determined to be in a state where the file has not been generated;
[0025] If so, then the clinical application feature information corresponding to the current object folder is determined to be in the state where the file has been generated.
[0026] Optionally, the first file name has a default filename extension that is a preset cover frame image extension;
[0027] The step of obtaining the first file in the system format file based on the first file name extension includes:
[0028] Based on the preset cover frame image suffix, at least one cover frame image from the system format file is obtained as the first file.
[0029] Optionally, the step of using preset filename identifiers to obtain and parse system format files in each object folder to obtain ultrasound examination feature information corresponding to each object folder includes:
[0030] Iterate through each of the object folders;
[0031] For the accessed current object folder, determine whether the system format files in the current object folder conform to the preset hierarchical structure and determine whether the file names of each system format file conform to the preset naming rules;
[0032] If the system format files in the current object folder conform to a preset hierarchical structure and the filenames of each system format file conform to a preset naming rule, then according to the preset filename identifier, the system format files in the current object folder are obtained and parsed to obtain the ultrasound examination feature information of each ultrasound examination in the current object folder.
[0033] If the system format files in the current object folder do not conform to the preset hierarchical structure or the filenames of the system format files do not conform to the preset naming rules, then the next object folder is taken as the current object folder, and the steps of determining whether the files in the current object folder conform to the preset hierarchical structure and determining whether the filenames of each file conform to the preset naming rules are executed.
[0034] Optionally, after determining whether the system format files in the accessed current object folder conform to a preset hierarchical structure and whether the filenames of each system format file conform to a preset naming rule, the method further includes:
[0035] Determine whether all the specified object folders have been traversed;
[0036] If the traversal is not completed, the next object folder is taken as the current object folder, and the steps of determining whether the system format files in the current object folder conform to the preset hierarchical structure and determining whether the file names of each system format file conform to the preset naming rules are executed.
[0037] If the traversal is complete, then the step of restoring the database data storage file based on the ultrasound examination feature information corresponding to each of the object folders is executed.
[0038] Optionally, after obtaining the file recovery command, the method further includes:
[0039] Based on the generation status of ultrasound examination feature information, the recovery status information of each object folder is obtained;
[0040] File status information is generated based on the recovery status information of each object folder;
[0041] Based on the object folder with generated ultrasound examination feature information, the recovered object folder is obtained;
[0042] The number of recovered files is obtained based on the number of system format files in the recovered object folder. The total number of system format files is determined. Progress information is generated based on the number of recovered files and the total number of files.
[0043] The file status information and progress information are displayed.
[0044] Optionally, the file recovery command carries file location information;
[0045] The process involves using preset filename identifiers to obtain and parse system format files in each object folder to acquire ultrasound examination feature information corresponding to each object folder, including:
[0046] Based on the file location information carried by the file recovery command, obtain each of the object folders;
[0047] Using the preset file name identifier, the system format file in each of the object folders is obtained and parsed to obtain the ultrasound examination feature information corresponding to each of the object folders;
[0048] Accordingly, the step of restoring the database data storage file based on the ultrasound examination feature information corresponding to each of the object folders includes:
[0049] The target file location for storing the recovered files is obtained based on the file location information;
[0050] Based on the ultrasound examination feature information corresponding to each of the object folders, the database data storage file is restored in the target file location.
[0051] Optionally, the step of restoring the database data storage file based on the ultrasound examination feature information corresponding to each object folder includes:
[0052] Determine whether there are historical database data storage files in the root directory corresponding to each of the object folders;
[0053] If so, delete the historical database data storage file and regenerate the database data storage file according to the ultrasound examination feature information;
[0054] If not, then based on the ultrasound examination feature information, restore the database data storage file in the root directory.
[0055] This invention also provides a file import method, comprising:
[0056] When it is determined that there is no database data storage file in the storage space, the system format file in each object folder is obtained and parsed using a preset file name identifier to obtain the ultrasound examination feature information corresponding to each object folder; wherein, the object folder is used to store the ultrasound examination data generated by performing ultrasound examination on the ultrasound examination object in the form of a system format file.
[0057] Based on the ultrasound examination feature information corresponding to each of the object folders, the database data storage file is restored in the storage space;
[0058] Import the system format files and the database data storage files from the object folders in the storage space into the ultrasound device.
[0059] Optionally, the ultrasound examination feature information includes clinical application feature information;
[0060] When the clinical application feature information corresponding to a certain object folder is in a state where the file has not been generated, the ultrasound device is triggered to generate a clinical application feature file in the corresponding object folder based on the data stored in the database.
[0061] The present invention also provides a database file recovery device, comprising:
[0062] The instruction acquisition module is used to acquire file recovery instructions;
[0063] The information parsing module is used to respond to the file recovery command, use a preset file name identifier to obtain and parse the system format files in each object folder, and obtain the ultrasound examination feature information corresponding to each object folder; wherein, the object folder is used to store the ultrasound examination data generated by performing ultrasound examination on the ultrasound examination object in the form of system format files;
[0064] The recovery generation module is used to recover the database data storage file based on the ultrasound examination feature information corresponding to each of the object folders.
[0065] The present invention also provides a file import device, comprising:
[0066] The feature information acquisition module is used to acquire and parse the system format files in each object folder using a preset file name identifier when it is determined that there are no database data storage files in the storage space, so as to obtain the ultrasound examination feature information corresponding to each object folder; wherein, the object folder is used to store the ultrasound examination data generated by performing ultrasound examination on the ultrasound examination object in the form of system format files;
[0067] The file recovery module is used to recover the database data storage files in the storage space based on the ultrasound examination feature information corresponding to each of the object folders.
[0068] The file import module is used to import the system format files and the database data storage files from the object folders in the storage space into the ultrasound device.
[0069] The present invention also provides an electronic device, comprising:
[0070] Memory, used to store computer programs;
[0071] A processor for implementing the steps of the method as described above when executing the computer program.
[0072] In addition, the present invention provides a computer-readable storage medium on which a computer program is stored, which, when executed by a processor, implements the steps of the method described above.
[0073] The present invention provides a method for recovering database files, comprising: obtaining a file recovery instruction; responding to the file recovery instruction, using a preset file name identifier, obtaining and parsing system format files in each object folder to obtain ultrasound examination feature information corresponding to each object folder; wherein, the object folder is used to store ultrasound examination data generated by performing ultrasound examinations on ultrasound examination objects in the form of system format files; and recovering the database data storage file according to the ultrasound examination feature information corresponding to each object folder.
[0074] As can be seen, this invention, by utilizing preset filename identifiers, obtains and parses system format files in each object folder to acquire ultrasound examination feature information corresponding to each object folder. It can then use image-related data from the system format data to obtain the ultrasound examination feature information required to recover the database data storage file. This allows for the recovery of the database data storage file, enabling users to conveniently and efficiently recover accidentally deleted or erroneous database data storage files, thus improving the user experience. Furthermore, this invention also provides a file import method, a database file recovery device, a file import device, an apparatus, and a computer-readable storage medium, all possessing the aforementioned beneficial effects. Attached Figure Description
[0075] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0076] Figure 1 A flowchart illustrating a database file recovery method provided in an embodiment of the present invention;
[0077] Figure 2 A schematic diagram of the hierarchical structure of system format data for another database file recovery method provided in an embodiment of the present invention;
[0078] Figure 3 A schematic diagram of a data recovery window for another database file recovery method provided in an embodiment of the present invention;
[0079] Figure 4 This is a schematic diagram of the user operation flow of another database file recovery method provided in an embodiment of the present invention;
[0080] Figure 5 This is a flowchart illustrating another method for recovering database files provided in an embodiment of the present invention;
[0081] Figure 6 A flowchart of a file import method provided in an embodiment of the present invention;
[0082] Figure 7 This is a structural block diagram of a database file recovery device provided in an embodiment of the present invention;
[0083] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention;
[0084] Figure 9 This is a schematic diagram of the specific structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0085] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0086] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating a database file recovery method provided in an embodiment of the present invention. This method can be applied to electronic devices such as ultrasound equipment, specifically to the processor of the electronic device. The method may include:
[0087] Step 101: Obtain file recovery instructions.
[0088] Understandably, the various ultrasound data files (i.e., system format files) exported from ultrasound machines to external storage devices include not only files corresponding to the specific image-related data of each ultrasound examination object, such as cover frame images, DICOM (Digital Imaging and Communications in Medicine) files, parameter files, and measurement information record files, but also database data storage files (such as database .db files) used to record ultrasound examination characteristic information, such as ultrasound examination object number, examination number, and / or ultrasound image type. The files corresponding to the specific image-related data of each ultrasound examination object are stored in their respective object folders, while the database data storage files are mostly stored at the same level as these object folders. This leads some users to mistakenly believe that the database data storage files are useless when using the external storage device for other purposes or cleaning up storage space, and delete them. This prevents the ultrasound equipment from using the remaining system format files to complete the data import. In this embodiment, image-related data is used to obtain the ultrasound examination feature information required to recover the database data storage file. The ultrasound examination feature information is then used to recover the new database data storage file, thus realizing the recovery of the database data storage file. This allows users to conveniently and efficiently recover accidentally deleted or erroneous database data storage files, avoiding the tedious process of manually exporting the system format file from the original ultrasound machine, thereby improving the user experience.
[0089] In this step, the file recovery command can be a control command to recover the database data storage files (such as database .db files) corresponding to each object folder. The specific content of the file recovery command in this step can be customized by the designer according to the practical scenario and user needs. For example, to facilitate the retrieval of system-formatted files within the object folder, the file recovery command can carry file location information; for instance, the file location information can include the root directory corresponding to all object folders (such as...). Figure 2 The path information of the root directory of the USB drive shown is the path information of the root directory containing all object folders; the location information may also include all object folders (such as...). Figure 2 The path information corresponding to each of the patient directories (from patient 1 to patient n) is shown. This embodiment does not impose any restrictions on this, as long as the processor can retrieve the system format files in each object folder in response to the file recovery command.
[0090] Specifically, the method by which the processor obtains file recovery instructions in this step can be set by the designer according to the practical scenario and user needs. For example, the processor can generate file recovery instructions based on the click instruction of the displayed "Start Recovery" button and the file location information corresponding to that click instruction; for example, when the file location information is the path information of the root directory, the user can configure the path information of the root directory in the data recovery window of the human-computer interaction interface, and click the data recovery window after configuration (e.g., ...). Figure 3 The "Start Recovery" button (as shown) controls the processor to generate file recovery instructions. Figure 3 and Figure 4 As shown, after opening the data recovery tool, users can first click the "Open" button in the data recovery window to bring up the file directory selection pop-up window, select the directory (i.e., the root directory) where the object folder of each patient (ultrasound examination object) is located, and then click "OK" to configure the path information of the root directory; then click the "Start Recovery" button in the data recovery window to generate file recovery instructions and trigger the recovery process of the corresponding database data storage files.
[0091] It should be noted that the database file recovery method provided in this embodiment can be applied to ultrasound equipment. That is, the processor of the ultrasound equipment can execute the steps in the method provided in this embodiment to recover the database data storage file. For example, a user can perform the database data storage file recovery operation on an ultrasound equipment that needs to import patient examination data. The database file recovery method provided in this embodiment can also be applied to a computer. That is, the computer's processor can execute the steps in the method provided in this embodiment. For example, the computer's processor can execute the steps in the method provided in this embodiment during the startup process of the software tool to complete the database data storage file recovery operation. This software tool is compatible with multiple PC (computer) platforms, making it convenient for users to perform database data storage file recovery operations on their personal or work PCs.
[0092] Correspondingly, when the method provided in this embodiment is applied to an ultrasound device, the processor of the ultrasound device can, during the import of system format data, if it detects that the system format data is missing a database data storage file or that the database data storage file in the system format data is incorrect, display a data recovery window and corresponding prompts to prompt the user to recover the database data storage file, or automatically generate a database data storage file based on each object folder in the system format data. For example, before step 101, it may also include: obtaining a data import instruction; wherein, the data import instruction carries the path information of the root directory (i.e., the root directory of the system format data) corresponding to all object folders; based on the path information, determining whether a database data storage file exists in the root directory; if yes, the system format data import operation can continue; if not, displaying a data recovery window, or generating a file recovery instruction based on the path information.
[0093] Step 102: In response to the file recovery command, the system format files in each object folder are obtained and parsed using the preset file name identifier to obtain the ultrasound examination feature information corresponding to each object folder; wherein, the object folder is used to store the ultrasound examination data generated by performing ultrasound examination on the ultrasound examination object in the form of system format files.
[0094] It is understood that the object folder in this step can be the folder corresponding to each ultrasound examination object, used to store the ultrasound examination data (i.e., system format data) files (i.e., system format files) generated from ultrasound examinations of each ultrasound examination object exported by the ultrasound equipment. The system format files in each object folder in this step can be system format data files from historical object folders exported by the ultrasound equipment, such as cover frame images, DICOM files, parameter files, and measurement information record files, etc., which are image-related data files. The preset filename identifier in this step can be the filename identifier of all or part of the system format files for each ultrasound examination within the pre-set object folder, that is, the filename identifier of the system format file corresponding to the ultrasound examination feature information related to the recovery of the database data storage file. In this step, the processor can use the preset filename identifier to retrieve the corresponding system format files for each ultrasound examination in each object folder, thereby parsing the retrieved system format files to obtain the ultrasound examination feature information for each ultrasound examination.
[0095] Specifically, the content and quantity of ultrasound examination feature information in this embodiment can be set by the designer based on the practical scenario and user needs. For example, ultrasound examination feature information may include the examination object ID (identity number) to associate ultrasound images with the identity of the ultrasound examination object; ultrasound examination feature information may also include the examination ID to associate ultrasound images with each ultrasound examination; ultrasound examination feature information may also include ultrasound image type, such as single-frame image, movie file, 4D image, and 4D volume; ultrasound examination feature information may also include clinical application feature information, such as the status information of whether a clinical application feature file (such as a DICOM file) storing clinical application feature information has been generated, for example, a file not generated or a file generated, to mark whether a clinical application feature file corresponding to each ultrasound examination exists, so as to determine whether the corresponding DICOM file needs to be generated when importing data into the ultrasound device; clinical application feature information may also be a file not generated or clinical application feature information obtained by parsing the clinical application feature file, so that when importing data into the ultrasound device, the clinical application feature information obtained by parsing the file can be directly used. As long as the processor can use the ultrasound examination feature information to generate database data storage files, this embodiment does not impose any restrictions on this.
[0096] Correspondingly, the specific content of the preset filename identifier in this embodiment can be set by the designer according to the practical scenario and user needs. For example, the preset filename identifier may include a preset filename suffix (i.e., a preset filename suffix). For example, the preset filename suffix may include a preset cover frame image suffix, i.e., a preset cover frame image file suffix, such as .bmp (Bitmap, an image file format) and .jpeg (Joint Photographic Experts Group, an international image compression standard), to facilitate the extraction of filename prefixes; the preset filename suffix may also include a preset medical digital imaging and communication filename suffix, such as .dcm (DICOM), to realize the acquisition of clinical application feature information; the preset filename suffix may also include a preset subtitle filename suffix, such as _backendsystem.idx (backend system .idx) or .idx (a subtitle file), to realize the acquisition of ultrasound image type; the preset filename suffix may also include other suffixes, as long as the processor can use the preset filename suffix to obtain ultrasound examination feature information to realize the generation of database data storage files, this embodiment does not impose any restrictions on this.
[0097] Specifically, the method by which the processor uses preset filename identifiers to obtain and parse system format files in each object folder to get the ultrasound examination feature information corresponding to each object folder in this step can be set by the designer according to the practical scenario and user needs. For example, the preset filename identifiers may include a first filename suffix and a second filename suffix. In this step, the processor can traverse each object folder; for the current object folder being accessed, the processor obtains the first file in the system format file according to the first filename suffix; parses the filename of the first file, and obtains the basic filename prefix configured for the current ultrasound examination based on the parsed filename; and obtains and parses the second file in the system format file according to the basic filename prefix and the second filename suffix to get the ultrasound examination feature information corresponding to the current object folder.
[0098] In some embodiments, the first filename suffix can be a preset cover frame image suffix (such as .bmp and .jpeg), and the second filename suffix can be another filename suffix besides the first filename suffix (such as .dcm and .idx); that is, the processor can obtain the cover frame image file (i.e., the first file) for each ultrasound examination based on the special suffix of the cover frame image file (i.e., the first filename suffix), such as... Figure 2 Each ultrasound examination under the examination directory (examination 1 to examination n directories) has its own corresponding image cover file (image 1 cover file to image n cover file). The specific basic file name prefix can be extracted from the file name of the cover frame image file. Then, the basic file name prefix is combined with a specific file name suffix (i.e., the second file name suffix) to obtain the other system data path corresponding to the image cover file (i.e., this examination). Finally, the system file (i.e. the second file) of the corresponding path is parsed to obtain the image-related detailed information (i.e., ultrasound examination feature information) and saved to the temporary record map (container). After all patient directories have been traversed, the ultrasound examination feature information in the temporary record map is used to generate a database data storage file.
[0099] For example, if the first filename's file extension includes .bmp, the search finds a cover frame image file (i.e., the first file) with the filename 20220317_101454_UROLOGY_1.bmp and the file path usb1 / 20220317_101454_0000000 / 1.2.156.112601.1.3.2831174751.19804.1647483294.191768 / 2 If the file is named 0220317_101454_UROLOGY_1.bmp, the extracted filename prefix can be 20220317_101454_UROLOGY_1, the check ID can be 1.2.156.112601.1.3.2831174751.19804.1647483294.191768, and the patient ID can be 20220317_101454_0000000.
[0100] Accordingly, the filename prefix is concatenated with the .dcm suffix (i.e., the default DICOM filename suffix) to obtain the DICOM filename 20220317_101454_UROLOGY_1.dcm. Then, the existence of the DICOM file is checked. If it does not exist, the clinical application feature information is determined to be in a file-not-generated state, marking that the DICOM file corresponding to this image has not yet been generated and needs to be generated by the ultrasound device during subsequent data import. If the DICOM file exists, the clinical application feature information corresponding to the current object folder can be determined to include the file-generated status and information obtained from parsing the clinical application feature file, such as reading the corresponding dcmtag field from the DICOM file. These fields record information required by the DICOM standard, such as the number of image frames, patient age, and patient gender, and at the same time, the DICOM file for this image is marked as generated. In other words, when the ultrasound examination feature information includes clinical application feature information, the process of obtaining and parsing the second file in the system format file based on the basic file name prefix and the second file name suffix to obtain the ultrasound examination feature information corresponding to the current object folder may include: combining the preset medical digital imaging and communication file name suffix in the basic file name prefix and the second file name suffix to obtain the second file path, and determining whether there is a clinical application feature file matching the second file path in the system format file corresponding to the current object folder; if not, then determining that the clinical application feature information corresponding to the current object folder is in a file-not-generated state; if yes, then determining that the clinical application feature information corresponding to the current object folder is in a file-generated state, or determining that the clinical application feature information corresponding to the current object folder includes the information obtained from the clinical application feature file and the file-generated state.
[0101] Correspondingly, the backend system file name obtained by concatenating the above basic file name prefix with the suffix _backendsystem.idx (i.e., the default subtitle file name suffix) is 20220317_101454_UROLOGY_1_backendsystem.idx. Under normal circumstances, this file must exist. If it does not exist, it proves that the previously exported system format file is missing, and the parsing process of this image can be skipped directly. The image type (i.e., ultrasound image type) to which the image belongs can be read from this file. In other words, when the ultrasound examination feature information includes ultrasound image type, the above-mentioned process of obtaining and parsing the second file in the system format file based on the basic file name prefix and the second file name suffix to obtain the ultrasound examination feature information corresponding to the current object folder includes: combining the preset subtitle file name suffix in the basic file name prefix and the second file name suffix to obtain the first file path; determining whether there is an image type file matching the first file path in the system format file corresponding to the current object folder; if it exists, parsing the image type file to obtain the ultrasound image type corresponding to the current object folder; if it does not exist, determining that the system format file corresponding to the current object folder is missing, and the acquisition of the ultrasound examination feature information corresponding to the current ultrasound examination in the current object folder can be terminated, and the acquisition of the ultrasound examination feature information corresponding to the next ultrasound examination can continue.
[0102] Specifically, the above operations are performed on each cover frame image file to obtain ultrasound examination feature information such as examination ID, patient ID, image type, and clinical application characteristics for each cover frame image file (i.e., each ultrasound examination), which is then saved to a temporary record map. After the cover frame image files are traversed, the ultrasound examination feature information in the temporary record map is used to generate a database data storage file. That is, the first filename suffix can be a preset cover frame image suffix. The above-mentioned method of obtaining the first file in the system format file based on the first filename suffix includes: obtaining at least one cover frame image (i.e., a cover frame image file) from the system format file based on the preset cover frame image suffix, as the first file; for example, all cover frame images (i.e., cover frame image files) in the system format file can be obtained based on the preset cover frame image suffix and used as the first file. Optionally, all cover frame image files matching the preset cover frame image suffix can be obtained from the system format file and used as the first file.
[0103] It should be noted that in this step, the processor can retrieve the object folders corresponding to all ultrasound examination objects and then traverse each object folder. For each object folder, it can determine whether the system format files in the object folder conform to the preset hierarchical structure and preset naming rules (such as the file names of ultrasound system image files having a specified special file prefix). If they conform, the subsequent process of obtaining ultrasound examination feature information using preset file name identifiers will proceed. If they do not conform, the processor can continue to traverse the next object folder.
[0104] In other words, in some embodiments, step 102 may include: traversing each object folder; for the accessed current object folder, determining whether the system format files in the current object folder conform to a preset hierarchical structure and whether the filenames of each system format file conform to a preset naming rule; if the system format files in the current object folder conform to the preset hierarchical structure and the filenames of each system format file conform to the preset naming rule, then according to the preset filename identifier, obtaining and parsing the system format files in the current object folder to obtain the ultrasound examination feature information of each ultrasound examination in the current object folder; determining whether all object folders have been traversed; if not, then the next object folder is taken as the current object folder, and the steps of determining whether the system format files in the current object folder conform to the preset hierarchical structure and whether the filenames of each system format file conform to the preset naming rule are executed; if the traversal is completed, then proceed to step 103, and restore the database data storage file according to the ultrasound examination feature information corresponding to each object folder; if the system format files in the current object folder do not conform to the preset hierarchical structure or the filenames of the system format files do not conform to the preset naming rule, then the next object folder is taken as the current object folder, and the steps of determining whether the system format files in the current object folder conform to the preset hierarchical structure and whether the filenames of each system format file conform to the preset naming rule are executed.
[0105] Correspondingly, when the file recovery instruction obtained in step 101 carries file location information, the processor in this step can obtain each object folder according to the file location information carried by the file recovery instruction; using the preset file name identifier, it can obtain and parse the system format files in each object folder to obtain the ultrasound examination feature information corresponding to each object folder.
[0106] like Figure 5As shown, when the file recovery command carries file location information such as the path information of the root directory corresponding to each object folder, the processor can first retrieve all subdirectories (i.e., object folders) under the root directory (selected directory) selected by the user, and then traverse these subdirectories. For each subdirectory, the processor retrieves the file hierarchy and file name under that subdirectory, and determines whether the file hierarchy and file name conform to the corresponding rules of ultrasound data (i.e., preset hierarchy and preset naming rules). If they conform to the rules, the processor first obtains all cover frame image files under the object folder based on the special suffixes of the cover frame image files (e.g., .bmp and .jpeg). This allows the processor to extract the specific base file name prefix from the cover frame image file name. Then, the processor combines the base file name prefix with the specific file name suffix (e.g., .dcm, .idx) to obtain the other system data path corresponding to the image. Finally, the processor parses the system files of the corresponding path to obtain the detailed information of the image (i.e., ultrasound examination feature information) and saves it to the temporary record map. If the processor does not conform to the rules, it can continue to traverse the next subdirectory until all subdirectories have been traversed.
[0107] Step 103: Restore the database data storage file based on the ultrasound examination feature information corresponding to each object folder.
[0108] Understandably, in this step, the processor can generate a database data storage file, such as a database .db file, based on the obtained ultrasound examination feature information. This enables the recovery of the database data storage file, allowing subsequent ultrasound equipment to use the recovered database data storage file and image-related data from each object folder to import patient examination data. This allows users to view the corresponding patient examination data or perform callback and measurement operations on the ultrasound equipment.
[0109] Specifically, the method by which the processor restores the database data storage file based on the ultrasound examination feature information corresponding to each object folder in this embodiment can be set by the designer according to the practical scenario and user needs. For example, the processor can generate the database data storage file based on the ultrasound examination feature information and a preset template file; Figure 5 As shown, when the database data is stored in a database db file, the processor can copy the preset template file (db template) to the root directory (selected directory) corresponding to all patient directories, and write the information in the temporary record map (i.e., ultrasound examination feature information) into the preset template file to complete the recovery of the database db file.
[0110] Correspondingly, when the file recovery instruction obtained in step 101 carries file location information, the processor in this step can obtain the target file location for storing the recovered files based on the file location information carried by the file recovery instruction; and restore the database data storage file in the target file location based on the ultrasound examination feature information corresponding to each object folder.
[0111] Furthermore, in some embodiments, in this step, the processor can determine whether a historical database data storage file exists in the root directory corresponding to each object folder; if so, the historical database data storage file is deleted, and a new database data storage file is generated based on the ultrasound examination feature information; if not, the database data storage file is restored in the root directory based on the ultrasound examination feature information. In other words, the processor can identify existing database data storage files (i.e., historical database data storage files) in the root directories corresponding to all object folders as erroneous database data storage files, and thus directly delete these database data storage files to avoid interference with the subsequent data import process of the ultrasound equipment. Figure 5 As shown, when the database data is stored in a database db file, the processor can determine whether the root directory (selected directory) corresponding to all object folders already contains a db file (i.e., the historical database data storage file) after traversing the subdirectories (object folders). If so, the existing db file is deleted, and the next step of copying the db template is performed to regenerate the db file. If not, the next step of copying the db template is performed directly.
[0112] Correspondingly, before deleting the historical database data storage file, a deletion selection pop-up window can be displayed. Based on the click command of the delete button in the deletion selection pop-up window, the historical database data storage file is deleted. In other words, the processor can prompt the user to confirm whether to delete the historical database data storage file by displaying a deletion selection pop-up window before deletion. If the user confirms that the historical database data storage file is incorrect, clicking the delete button will directly delete the historical database data storage file. If the user confirms that the historical database data storage file is correct or has other uses, clicking the cancel delete button will directly end the process, allowing the user to later use the historical database data storage file for data import or to manually move the historical database data storage file.
[0113] Furthermore, in some embodiments, when the file recovery instruction carries file location information, after obtaining the file recovery instruction, the method further includes: when it is detected that no system format file exists in each object folder, outputting a prompt message indicating that the ultrasound examination data does not exist, to prompt the user to reconfigure the file location information. For example... Figure 5As shown, the processor can output a message indicating that there is no patient examination information in the selected directory when there is no object folder (subdirectory) in the root directory (selected directory) corresponding to all object folders.
[0114] Furthermore, in some embodiments, after obtaining the file recovery instruction, the method further includes: obtaining recovery status information for each object folder based on the generation status of ultrasound examination feature information, and obtaining a recovered object folder based on the object folders for which ultrasound examination feature information has been generated; generating file status information based on the recovery status information of each object folder; obtaining the number of recovered files based on the number of system format files in the recovered object folder, determining the total number of system format files, and generating progress information based on the number of recovered files and the total number of files; and displaying the file status information and progress information. Optionally, the object folders for which ultrasound examination feature information has been generated can be obtained based on the generation status of the ultrasound examination feature information, thereby determining the recovered object folders.
[0115] like Figure 3 and Figure 4 As shown, the processor can obtain specific file status information and progress information during the recovery process of the database data storage file. It can use the progress information to refresh the progress bar of the recovery process in the data recovery window, and use the file status information of the recovery process to refresh the file information parsed by the recovery process in the recovery process output box of the data recovery window, such as file name and file path.
[0116] In this embodiment, the present invention uses a preset filename identifier to obtain and parse the system format files in each object folder, thereby obtaining the ultrasound examination feature information corresponding to each object folder. It can use the image-related data in the system format data to obtain the ultrasound examination feature information required to recover the database data storage file, and thus use the ultrasound examination feature information to recover the new database data storage file, realizing the recovery of the database data storage file. This allows users to conveniently and efficiently recover accidentally deleted or erroneous database data storage files, improving the user experience.
[0117] Based on the above method embodiments, this invention also provides a file import method. The file import method described below and the database file recovery method described above can be referred to each other.
[0118] Please refer to Figure 6 , Figure 6 A flowchart illustrating a file import method provided in an embodiment of the present invention. The apparatus may include:
[0119] Step 201: When it is determined that there is no database data storage file in the storage space, the system format file in each object folder is obtained and parsed using the preset file name identifier to obtain the ultrasound examination feature information corresponding to each object folder; wherein, the object folder is used to store the ultrasound examination data generated by performing ultrasound examination on the ultrasound examination object in the form of system format file.
[0120] Step 202: Based on the ultrasound examination feature information corresponding to each object folder, restore the database data storage file in the storage space.
[0121] Step 203: Import the system format files and database data storage files from the object folders in the storage space into the ultrasound device.
[0122] It is understood that the storage space in this embodiment can be the space used for importing ultrasound examination data; that is, under normal circumstances, the storage space can store object folders and database data storage files. The storage space can be the storage space on an external storage device inserted into the ultrasound equipment, such as a USB flash drive, portable hard drive, etc.
[0123] Optionally, importing the system format files and database data storage files from each object folder into the ultrasound device can be done by copying the system format files and database data storage files from each object folder to the internal storage device of the ultrasound device, so that the ultrasound device can directly open or edit the corresponding files.
[0124] In this embodiment, in the event of an anomaly where the database data storage file does not exist, the database data storage file can be restored in the storage space, thereby ensuring that the import of ultrasound examination data from the ultrasound equipment can proceed normally and improving the user experience.
[0125] Specifically, steps 201 and 202 in this step are similar to steps 101 to 103 in the previous embodiment, and will not be described again here.
[0126] It should be noted that the file import method provided in this embodiment can be applied to ultrasound equipment. That is, the processor of the ultrasound equipment can execute the steps in the method provided in this embodiment to realize the recovery of the database data storage file and the import of ultrasound examination data.
[0127] Specifically, in this embodiment, when the ultrasound examination feature information includes clinical application feature information, if the clinical application feature information corresponding to a certain object folder is in a state where the file has not been generated, the ultrasound device can be triggered to generate a clinical application feature file (such as a DICOM file) in the corresponding object folder based on the database data storage file. This allows the ultrasound device to subsequently parse the clinical application feature file and obtain the corresponding clinical application feature information (such as the number of image frames, patient age, patient gender, etc.), ensuring that the import of ultrasound examination data can be completed smoothly. For example, during the import of system format files and database data storage files from each object folder into the ultrasound device, if the ultrasound device parses the imported database data storage file and finds that the clinical application feature information corresponding to a certain object folder is in a state where the file has not been generated, it can generate the corresponding clinical application feature file in that object folder.
[0128] Corresponding to the above method embodiments, this invention also provides a database file recovery device. The database file recovery device described below and the database file recovery method described above can be referred to each other.
[0129] Please refer to Figure 7 , Figure 7 This is a structural block diagram of a database file recovery device provided in an embodiment of the present invention. The device may include:
[0130] Instruction acquisition module 10 is used to acquire file recovery instructions;
[0131] Information parsing module 20 is used to respond to file recovery commands, use preset file name identifiers to obtain and parse system format files in each object folder, and obtain ultrasound examination feature information corresponding to each object folder; wherein, the object folder is used to store ultrasound examination data generated by ultrasound examination of the ultrasound examination object in the form of system format files.
[0132] The recovery generation module 30 is used to recover the database data storage file based on the ultrasound examination feature information corresponding to each object folder.
[0133] Optionally, the preset filename identifier includes a first filename suffix and a second filename suffix; the information parsing module 20 may include:
[0134] The first traversal submodule is used to iterate through each object folder;
[0135] The first acquisition submodule is used to obtain the first file in the system format file based on the first file name extension of the accessed current object folder;
[0136] The prefix acquisition submodule is used to parse the filename of the first file and obtain the basic filename prefix configured for the current ultrasound examination based on the parsed filename.
[0137] The second acquisition submodule is used to obtain and parse the second file in the system format file based on the prefix of the base file name and the suffix of the second file name to obtain the ultrasound examination feature information corresponding to the current object folder.
[0138] Optionally, the ultrasound examination feature information includes the ultrasound image type; the second acquisition submodule may include:
[0139] The first judgment unit is used to combine the basic file name prefix and the preset subtitle file name suffix in the second file name suffix to obtain the first file path, and to determine whether there is an image type file matching the first file path in the system format file corresponding to the current object folder;
[0140] The parsing unit is used to parse the image type file if an image type file exists, and obtain the ultrasound image type corresponding to the current object folder;
[0141] The missing file determination unit is used to determine if the system format file corresponding to the current object folder is missing if the image type file does not exist.
[0142] Optionally, the ultrasound examination feature information includes clinical application feature information; the second acquisition submodule may include:
[0143] The second judgment unit is used to combine the preset medical digital imaging and communication file name suffix in the basic file name prefix and the second file name suffix to obtain the second file path, and to determine whether there is a clinical application feature file matching the second file path in the system format file corresponding to the current object folder.
[0144] The first case determination unit is used to determine that if no clinical application feature file exists, the clinical application feature information corresponding to the current object folder is in a file-not-generated state.
[0145] The second case determination unit is used to determine that the clinical application feature information corresponding to the current object folder is in the state of "file has been generated" if a clinical application feature file exists.
[0146] Optionally, the first file name suffix is a preset cover frame image suffix; the first acquisition submodule can be specifically used to acquire at least one cover frame image from the system format file according to the preset cover frame image suffix, as the first file.
[0147] Optionally, the information parsing module 20 may include:
[0148] The second traversal submodule is used to traverse each object folder;
[0149] The rule judgment submodule is used to determine whether the system format files in the current object folder conform to the preset hierarchical structure and whether the file names of each system format file conform to the preset naming rules for the accessed current object folder.
[0150] The information parsing submodule is used to obtain and parse the system format files in the current object folder according to the preset file name identifier if the system format files in the current object folder conform to the preset hierarchical structure and the file names of each system format file conform to the preset naming rules, so as to obtain the ultrasound examination feature information of each ultrasound examination in the current object folder.
[0151] The ignore submodule is used to treat the next object folder as the current object folder and send a start signal to the rule judgment submodule if the system format files in the current object folder do not conform to the preset hierarchical structure or the file names of the system format files do not conform to the preset naming rules.
[0152] Optionally, the information parsing module 20 may also include:
[0153] The traversal judgment submodule is used to determine whether all object folders have been traversed. If the traversal is not complete, the next object folder is taken as the current object folder, and a start signal is sent to the rule judgment submodule. If the traversal is complete, a start signal is sent to the recovery generation module 30.
[0154] Optionally, the device may also include:
[0155] The recovery acquisition module is used to obtain the recovery status information of each object folder based on the generation status of ultrasound examination feature information;
[0156] The status generation module is used to generate file status information based on the recovery status information of each object folder;
[0157] The recovered file determination module is used to generate file status information based on the recovery status information of each object folder;
[0158] The progress acquisition module is used to obtain the number of recovered files based on the number of system format files in the recovered object folder, determine the total number of system format files, and generate progress information based on the number of recovered files and the total number of files;
[0159] The display module is used to display file status and progress information.
[0160] Optionally, file recovery commands may include file location information;
[0161] Information parsing module 20 may include:
[0162] The folder retrieval submodule is used to retrieve the folders of each object based on the file location information carried by the file recovery command;
[0163] The file parsing submodule is used to obtain and parse the system format files in each object folder using preset file name identifiers, and obtain the ultrasound examination feature information corresponding to each object folder;
[0164] Accordingly, the recovery generation module 30 may include:
[0165] The location determination submodule is used to determine the target file location for storing the recovered files based on the file location information.
[0166] The file recovery submodule is used to recover the database data storage file in the target file location based on the ultrasound examination feature information corresponding to each object folder.
[0167] Optionally, the recovery generation module 30 may include:
[0168] The history judgment submodule is used to determine whether there are historical database data storage files in the root directory corresponding to each object folder;
[0169] The deletion and recovery submodule is used to delete the historical database data storage file if it exists, and regenerate the database data storage file based on the ultrasound examination feature information.
[0170] The direct recovery submodule is used to restore the database data storage file in the root directory if the historical database data storage file does not exist, based on the ultrasound examination feature information.
[0171] In this embodiment, the information parsing module 20 uses a preset filename identifier to obtain and parse the system format files in each object folder, and obtains the ultrasound examination feature information corresponding to each object folder. It can use the image-related data in the system format data to obtain the ultrasound examination feature information required to recover the database data storage file, and thus use the ultrasound examination feature information to recover the new database data storage file, thereby realizing the recovery of the database data storage file. This allows users to conveniently and efficiently recover accidentally deleted or erroneous database data storage files, improving the user experience.
[0172] Corresponding to the above method embodiments, this invention also provides a file import device. The file import device described below and the file import method described above can be referred to each other.
[0173] A file import device, comprising:
[0174] The feature information acquisition module is used to obtain and parse the system format files in each object folder by using a preset file name identifier when it is determined that there are no database data storage files in the storage space, so as to obtain the ultrasound examination feature information corresponding to each object folder; wherein, the object folder is used to store the ultrasound examination data generated by performing ultrasound examination on the ultrasound examination object in the form of system format files.
[0175] The file recovery module is used to recover the database data storage files in the storage space based on the ultrasound examination feature information corresponding to each object folder;
[0176] The file import module is used to import system format files and database data files from various object folders in the storage space into the ultrasound device.
[0177] Optionally, ultrasound examination characteristics include clinical application characteristics;
[0178] The device may also include:
[0179] The file generation module is used to trigger the ultrasound device to generate a clinical application feature file in the corresponding object folder based on the database data when the clinical application feature information corresponding to a certain object folder is in a state where the file has not been generated.
[0180] Corresponding to the above method embodiments, this invention also provides an electronic device. The electronic device described below can be referred to in conjunction with the database file recovery method and file import method described above.
[0181] Please refer to Figure 8 , Figure 8 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. The device may include:
[0182] Memory D1 is used to store computer programs;
[0183] Processor D2 is used to implement the steps of the database file recovery method or file import method provided in the above method embodiments when executing a computer program.
[0184] For details, please refer to Figure 9 , Figure 9This is a schematic diagram of a specific structure of an electronic device provided in an embodiment of the present invention. The electronic device 310 can vary significantly due to different configurations or performance characteristics. It may include one or more central processing units (CPUs) 322 (e.g., one or more processors) and a memory 332, and one or more storage media 330 (e.g., one or more mass storage devices) for storing application programs 342 or data 344. The memory 332 and storage media 330 can be temporary or persistent storage. The program stored in the storage media 330 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the data processing device. Furthermore, the central processing unit 322 may be configured to communicate with the storage media 330 and execute the series of instruction operations in the storage media 330 on the electronic device 310.
[0185] Electronic device 310 may also include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input / output interfaces 358, and / or one or more operating systems 341. Examples include Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0186] Among them, electronic device 310 can specifically be a computer or ultrasound equipment (such as an ultrasound host).
[0187] The steps in the database file recovery or file import methods described above can be implemented by the structure of an electronic device.
[0188] Corresponding to the above method embodiments, this invention also provides a computer-readable storage medium. The computer-readable storage medium described below can be referred to in conjunction with the database file recovery method and file import method described above.
[0189] A computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the database file recovery method or file import method provided in the above-described method embodiments.
[0190] The computer-readable storage medium can specifically be a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, or any other readable storage medium capable of storing program code.
[0191] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatuses, electronic devices, and computer-readable storage media disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to in the method section.
[0192] The foregoing has provided a detailed description of a database file recovery method, file import method, apparatus, device, and computer-readable storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and core ideas of the present invention. It should be noted that those skilled in the art can make various improvements and modifications to the present invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of the present invention.
Claims
1. A method for recovering database files, characterized in that, include: Get file recovery instructions; In response to the file recovery command, the system format files in each object folder are obtained and parsed using a preset file name identifier to obtain the ultrasound examination feature information corresponding to each object folder; wherein, the object folder is used to store the ultrasound examination data generated by performing ultrasound examination on the ultrasound examination object in the form of system format files; Based on the ultrasound examination feature information corresponding to each of the object folders, restore the database data storage file; Wherein, the preset file name identifier includes a first file name suffix and a second file name suffix; The process involves using preset filename identifiers to obtain and parse system format files in each object folder to acquire ultrasound examination feature information corresponding to each object folder, including: Iterate through each of the object folders; For the currently accessed object folder, obtain the first file in the system format file based on the first file name extension; Parse the filename of the first file, and obtain the basic filename prefix configured for the current ultrasound examination based on the parsed filename; Based on the base file name prefix and the second file name suffix, the second file in the system format file is obtained and parsed to obtain the ultrasound examination feature information corresponding to the current object folder.
2. The database file recovery method according to claim 1, characterized in that, The ultrasound examination feature information includes the ultrasound image type; The step involves obtaining and parsing the second file in the system format file based on the base file name prefix and the second file name suffix to obtain the ultrasound examination feature information corresponding to the current object folder, including: Based on the basic file name prefix and the preset subtitle file name suffix in the second file name suffix, the first file path is obtained by combining them. Then, it is determined whether there is an image type file that matches the first file path in the system format file corresponding to the current object folder. If it exists, parse the image type file to obtain the ultrasound image type corresponding to the current object folder; If it does not exist, it indicates that the system format file corresponding to the current object folder is missing.
3. The database file recovery method according to claim 1, characterized in that, The ultrasound examination feature information includes clinical application feature information; The step involves obtaining and parsing the second file in the system format file based on the base file name prefix and the second file name suffix to obtain the ultrasound examination feature information corresponding to the current object folder, including: The second file path is obtained by combining the basic file name prefix and the preset medical digital imaging and communication file name suffix in the second file name suffix. It is then determined whether there is a clinical application feature file that matches the second file path in the system format file corresponding to the current object folder. If not, then the clinical application feature information corresponding to the current object folder is determined to be in a state where the file has not been generated; If so, then the clinical application feature information corresponding to the current object folder is determined to be in the state where the file has been generated.
4. The method for recovering database files according to any one of claims 1 to 3, characterized in that, The first file name has a default cover frame image extension; The step of obtaining the first file in the system format file based on the first file name extension includes: Based on the preset cover frame image suffix, at least one cover frame image from the system format file is obtained as the first file.
5. The method for recovering database files according to any one of claims 1 to 3, characterized in that, The process involves using preset filename identifiers to obtain and parse system format files in each object folder to acquire ultrasound examination feature information corresponding to each object folder, including: Iterate through each of the object folders; For the accessed current object folder, determine whether the system format files in the current object folder conform to the preset hierarchical structure and determine whether the file names of each system format file conform to the preset naming rules; If the system format files in the current object folder conform to a preset hierarchical structure and the filenames of each system format file conform to a preset naming rule, then according to the preset filename identifier, the system format files in the current object folder are obtained and parsed to obtain the ultrasound examination feature information of each ultrasound examination in the current object folder. If the system format files in the current object folder do not conform to the preset hierarchical structure or the filenames of the system format files do not conform to the preset naming rules, then the next object folder is taken as the current object folder, and the steps of determining whether the files in the current object folder conform to the preset hierarchical structure and determining whether the filenames of each file conform to the preset naming rules are executed.
6. The database file recovery method according to claim 5, characterized in that, For the accessed current object folder, after determining whether the system format files in the current object folder conform to the preset hierarchical structure and whether the filenames of each system format file conform to the preset naming rules, the method further includes: Determine whether all the specified object folders have been traversed; If the traversal is not completed, the next object folder is taken as the current object folder, and the steps of determining whether the system format files in the current object folder conform to the preset hierarchical structure and determining whether the file names of each system format file conform to the preset naming rules are executed. If the traversal is complete, then the step of restoring the database data storage file based on the ultrasound examination feature information corresponding to each of the object folders is executed.
7. The method for recovering database files according to any one of claims 1 to 3, characterized in that, After obtaining the file recovery command, the method further includes: Based on the generation status of ultrasound examination feature information, the recovery status information of each object folder is obtained; File status information is generated based on the recovery status information of each object folder; Based on the object folder with generated ultrasound examination feature information, the recovered object folder is obtained; The number of recovered files is obtained based on the number of system format files in the recovered object folder. The total number of system format files is determined. Progress information is generated based on the number of recovered files and the total number of files. The file status information and progress information are displayed.
8. The method for recovering database files according to any one of claims 1 to 3, characterized in that, The file recovery command carries file location information; The process involves using preset filename identifiers to obtain and parse system format files in each object folder to acquire ultrasound examination feature information corresponding to each object folder, including: Based on the file location information carried by the file recovery command, obtain each of the object folders; Using the preset file name identifier, the system format file in each of the object folders is obtained and parsed to obtain the ultrasound examination feature information corresponding to each of the object folders; Accordingly, the step of restoring the database data storage file based on the ultrasound examination feature information corresponding to each of the object folders includes: The target file location for storing the recovered files is obtained based on the file location information; Based on the ultrasound examination feature information corresponding to each of the object folders, the database data storage file is restored in the target file location.
9. The method for recovering database files according to any one of claims 1 to 3, characterized in that, The step of restoring the database data storage file based on the ultrasound examination feature information corresponding to each object folder includes: Determine whether there are historical database data storage files in the root directory corresponding to each of the object folders; If so, delete the historical database data storage file and regenerate the database data storage file according to the ultrasound examination feature information; If not, then based on the ultrasound examination feature information, restore the database data storage file in the root directory.
10. A file import method, characterized in that, include: When it is determined that there are no database data storage files in the storage space, the system format files in each object folder are obtained and parsed using a preset filename identifier to obtain the ultrasound examination feature information corresponding to each object folder. The object folder is used to store ultrasound examination data generated during ultrasound examinations of the object using system format files. If the preset filename identifier includes a first filename suffix and a second filename suffix, then obtaining and parsing the system format files in each object folder using the preset filename identifier to obtain the ultrasound examination feature information corresponding to each object folder includes: traversing each object folder; for the currently accessed object folder, obtaining the first file in the system format file based on the first filename suffix; parsing the filename of the first file, obtaining the basic filename prefix configured for the current ultrasound examination based on the parsed filename; obtaining and parsing the second file in the system format file based on the basic filename prefix and the second filename suffix to obtain the ultrasound examination feature information corresponding to the current object folder. Based on the ultrasound examination feature information corresponding to each of the object folders, the database data storage file is restored in the storage space; Import the system format files and the database data storage files from the object folders in the storage space into the ultrasound device.
11. The file import method according to claim 10, characterized in that, The ultrasound examination feature information includes clinical application feature information; When the clinical application feature information corresponding to a certain object folder is in a state where the file has not been generated, the ultrasound device is triggered to generate a clinical application feature file in the corresponding object folder based on the data stored in the database.
12. A database file recovery device, characterized in that, include: The instruction acquisition module is used to acquire file recovery instructions; The information parsing module is used to respond to the file recovery command, use a preset file name identifier to obtain and parse the system format files in each object folder, and obtain the ultrasound examination feature information corresponding to each object folder; wherein, the object folder is used to store the ultrasound examination data generated by performing ultrasound examination on the ultrasound examination object in the form of system format files; The recovery generation module is used to recover the database data storage file based on the ultrasound examination feature information corresponding to each of the object folders; If the preset filename identifier includes a first filename suffix and a second filename suffix, the information parsing module includes: The first traversal submodule is used to traverse each of the aforementioned object folders; The first acquisition submodule is used to acquire the first file in the system format file based on the first file name suffix for the accessed current object folder; The prefix acquisition submodule is used to parse the filename of the first file and obtain the basic filename prefix configured for the current ultrasound examination based on the parsed filename. The second acquisition submodule is used to acquire and parse the second file in the system format file based on the base file name prefix and the second file name suffix, so as to obtain the ultrasound examination feature information corresponding to the current object folder.
13. A file import device, characterized in that, include: The feature information acquisition module is used to, when it is determined that there is no database data storage file in the storage space, acquire and parse the system format files in each object folder using a preset filename identifier to obtain the ultrasound examination feature information corresponding to each object folder; wherein, the object folder is used to store the ultrasound examination data generated by performing ultrasound examination on the ultrasound examination object in the form of system format files; if the preset filename identifier includes a first filename suffix and a second filename suffix, then the step of acquiring and parsing the system format files in each object folder using the preset filename identifier to obtain the ultrasound examination feature information corresponding to each object folder includes: traversing each object folder; for the current object folder being accessed, acquiring the first file in the system format file according to the first filename suffix; parsing the filename of the first file, acquiring the basic filename prefix configured for the current ultrasound examination based on the parsed filename; acquiring and parsing the second file in the system format file according to the basic filename prefix and the second filename suffix to obtain the ultrasound examination feature information corresponding to the current object folder; The file recovery module is used to recover the database data storage files in the storage space based on the ultrasound examination feature information corresponding to each of the object folders. The file import module is used to import the system format files and the database data storage files from the object folders in the storage space into the ultrasound device.
14. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the method as described in any one of claims 1 to 11.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method as described in any one of claims 1 to 11.
Citation Information
Patent Citations
Database data automatic recovery method and device
CN111045868A
Database data recovery method and device
CN114281595A