CN111400258B - Data file storage method and device - Google Patents

Data file storage method and device Download PDF

Info

Publication number
CN111400258B
CN111400258B CN202010205060.2A CN202010205060A CN111400258B CN 111400258 B CN111400258 B CN 111400258B CN 202010205060 A CN202010205060 A CN 202010205060A CN 111400258 B CN111400258 B CN 111400258B
Authority
CN
China
Prior art keywords
data
file
index
storage
instruction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010205060.2A
Other languages
Chinese (zh)
Other versions
CN111400258A (en
Inventor
林文肃
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Carewell Electronics Co ltd
Original Assignee
Shenzhen Carewell Electronics Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Carewell Electronics Co ltd filed Critical Shenzhen Carewell Electronics Co ltd
Priority to CN202010205060.2A priority Critical patent/CN111400258B/en
Publication of CN111400258A publication Critical patent/CN111400258A/en
Application granted granted Critical
Publication of CN111400258B publication Critical patent/CN111400258B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/148File search processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/162Delete operations
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H10/00ICT specially adapted for the handling or processing of patient-related medical or healthcare data
    • G16H10/60ICT specially adapted for the handling or processing of patient-related medical or healthcare data for patient-specific data, e.g. for electronic patient records
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Health & Medical Sciences (AREA)
  • Epidemiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Primary Health Care (AREA)
  • Public Health (AREA)
  • Library & Information Science (AREA)
  • Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention relates to a data file storage method and a data file storage device, wherein the method comprises the following steps: setting a data storage instruction; performing file searching operation in a local storage carrier according to the index file name to generate a file handle identifier; setting an index file when the file handle identifier is not empty; when the data storage instruction is a data file creation instruction, executing a data file creation operation in the storage carrier to generate a data file storage structure, executing a data file setting operation on the data file storage structure, and executing an index file record adding operation on the index file to generate a data storage instruction state; when the data storage instruction is a data file deleting instruction, executing a data file deleting operation in the storage carrier, and executing an index file record deleting operation to generate a data storage instruction state; and when the data storage instruction state is that the instruction execution is successful, setting the data storage instruction to be empty.

Description

Data file storage method and device
Technical Field
The invention relates to the technical field of electrocardiographic data processing, in particular to a data file storage method and device.
Background
Along with the development of electronic technology and medical technology, the use of electrocardiographs has become increasingly popular in China. The conventional electrocardiograph has electrocardiographic function, real-time data observation and storage function, and can edit, store, measure, analyze and diagnose, report and print and remote transmission of stored data. And, bulk comparisons, analysis and statistics can also be performed on a large amount of inventory data. When the used inventory data is located on the electrocardio station or the cloud platform, the data file storage and acquisition can be completed by directly utilizing the efficient engine of the remote professional database in an online mode, so that the smooth experience of a user is ensured.
When the inventory data used is located on a storage carrier local to the device, problems arise in practical applications with the rapid expansion of the storage carrier capacity. The data storage mode of the conventional electrocardiograph is stored in an independent data file mode, namely, all information related to a patient is uniformly packaged into a whole data, and then the whole data is stored on a local storage carrier of the device in a single data file mode. For the original small-capacity storage carrier (capable of storing tens of patient data files to hundreds of patient data files), the storage mode can complete the search of the data files by only establishing a linear chain table, and because the number of files is not large and the linear chain table is short, the search process can not cause the time consumption of a device processor to be too long, and a user can not have bad feeling of service pause. However, with the rapid expansion of the storage carrier in the market, when the conventional electrocardiograph also has mass data storage capability (at least can store thousands of copies or even tens of thousands of copies), if the conventional linear linked list query mode is still used on the device, the device processor consumes too long time when searching the file because of too many files and too large linked list, and bad experiences such as false halt, interface pause and the like are caused to the user.
In order to solve the problem, an index file is added to correspond to each data file based on the original data file management (linear chain list) mode, and each index record of the index file corresponds to one data file. The user changes the time-consuming linear chain list full file traversing mode into a simple one-time index file reading mode when browsing files, and changes the time-consuming linear chain list file positioning and reading mode into a simple index file single record reading mode when acquiring single file information. Through the transformation and the upgrading, even if the electrocardiograph is not subjected to any hardware upgrading, the original data file of the electrocardiograph is not subjected to any adjustment, and the purposes of improving the file processing capacity and the efficiency of the equipment can be realized.
Disclosure of Invention
The invention aims at overcoming the defects of the prior art, and provides a data file storage method and a data file storage device, wherein the corresponding relation between a data file and an index file is established by designing a data file creation instruction processing flow; the corresponding relation between the index file and the data file is ensured not to be damaged by designing a data file deleting instruction processing flow; the key information in the data file is extracted from the data file creation instruction processing flow and is used as index record data to be stored in the index file, so that the electrocardiograph can directly acquire the data file information from the index record; by using the method and the device for storing and managing the data file, the file traversing efficiency and the file information acquisition efficiency of the electrocardiograph can be improved, and the problems of common false dead halt, interface pause and the like of the conventional electrocardiograph after the large-capacity storage carrier is loaded are solved.
To achieve the above object, a first aspect of an embodiment of the present invention provides a data file storage method, which is characterized in that the method includes:
setting a data storage instruction; the data storage instruction comprises a data file creation instruction and a data file deletion instruction;
according to the preset index file name, performing file searching operation in a local storage carrier to generate a file handle identifier;
when the file handle identifier is not empty, setting a file corresponding to the file handle identifier as an index file;
when the data storage instruction is the data file creation instruction, executing a data file creation operation in the storage carrier to generate a data file storage structure, executing a data file setting operation on the data file storage structure, and executing an index file record adding operation on the index file according to the data file storage structure to generate a data storage instruction state;
when the data storage instruction is the data file deleting instruction, executing data file deleting operation in the storage carrier, and executing index file record deleting operation on the index file to generate the data storage instruction state;
And when the data storage instruction state is that the instruction execution is successful, setting the data storage instruction to be empty.
Preferably, the method comprises the steps of,
the index file comprises a record counter and a plurality of index record data;
the data file creation instruction comprises creation file names, data file types, identification data, name data, gender data, age data, electrocardiograph detection data, electrocardiograph measurement data, electrocardiograph diagnosis and treatment monitoring analysis data and electrocardiograph equipment parameters;
the data file deleting instruction comprises a deleting file name;
the data file storage structure comprises a file data storage structure and a patient data storage structure; the file data storage structure at least comprises a file type, a data file name, a file creation date and a file creation time; the patient data storage structure includes a base data storage structure and a detection data storage structure; the base data storage structure includes at least a patient identification, a patient name, a patient gender, and a patient age; the test data storage structure includes at least patient test raw data, patient measurement result data, patient analysis result data, and test device data.
Preferably, the file handle identifier is generated by performing a file searching operation in a local storage carrier according to a preset index file name, and specifically includes:
according to the index file name, performing file retrieval operation on all files stored in the storage carrier; if a file matching the index file name is retrieved, assigning a unique identifier to the file to generate the file handle identifier; and if the file matched with the index file name is not retrieved, setting the file handle identifier to be null.
Preferably, the performing a data file creation operation in the storage carrier generates a data file storage structure, specifically including:
in the storage carrier, a variable-size storage space is allocated to generate the data file storage structure.
Preferably, the executing a data file setting operation on the data file storage structure specifically includes:
setting the file data storage structure of the data file storage structure; setting the data file name as the created file name in the data file creation instruction; setting the file type as the data file type in the data file creation instruction; acquiring date data of a system, and setting the file creation date; acquiring time data of a system, and setting the file creation time;
Setting the base data storage structure of the patient data storage structure of the data file storage structure; setting the patient identification as the identification data in the data file creation instruction; setting the last name of the patient as the name data in the data file creation instruction; setting the sex of the patient as the sex data in the data file creation instruction; setting the age of the patient as the age data in the data file creation instruction;
setting the detection data storage structure of the patient data storage structure of the data file storage structure; setting the patient detection original data as the electrocardiographic detection data in the data file creation instruction; setting the patient measurement result data as the electrocardiograph measurement data in the data file creation instruction; setting the patient analysis result data as the electrocardiographic diagnosis and treatment monitoring analysis data in the data file creation instruction; setting the data of the detection equipment as the electrocardio equipment parameters in the data file creation instruction.
Preferably, the step of generating a data storage instruction state by performing an index file record adding operation on the index file according to the data file storage structure specifically includes:
Extracting the file data storage structure, the base data storage structure and the patient analysis result data from the data file storage structure to generate data file extraction data;
distributing an index record identifier for the data file extraction data, and generating new index record data according to the index record identifier and the data file extraction data;
performing index record data adding operation on the newly added index record data to the index file to generate an index record data adding operation result;
and when the adding operation result of the index record data is that the adding is successful, adding 1 to the value of the record counter in the index file, and setting the data storage instruction state as that the instruction execution is successful.
Preferably, the performing a data file deletion operation on the storage carrier specifically includes:
and in the storage carrier, executing a storage space releasing operation on the data file storage structure corresponding to the deleted file name.
Preferably, the performing an index file record deletion operation on the index file generates the data storage instruction state, which specifically includes:
In the index file, performing index record data deleting operation on the index record data corresponding to the deleted file name to generate an index record data deleting operation result;
and when the result of the index record data deleting operation is that the deleting is successful, subtracting 1 from the value of the record counter in the index file, and setting the data storage instruction state as that the instruction execution is successful.
Preferably, the method further comprises:
when the file handle identifier is empty, setting an automatic reconstruction index file identifier; the automatic reconstruction index file identifier comprises automatic reconstruction and manual reconstruction;
and traversing all the data file storage structures on the storage carrier when the automatic reconstruction index file identifier is the automatic reconstruction, and performing file reconstruction operation on the index file.
According to the data file storage method provided by the first aspect of the embodiment of the invention, the corresponding relation between the data file and the index file is established by designing the data file creation instruction processing flow; the corresponding relation between the index file and the data file is ensured not to be damaged by designing a data file deleting instruction processing flow; and key information in the data file is extracted from the data file creation instruction processing flow and is stored in the index file as index record data, so that the electrocardiograph can directly acquire the data file information from the index record.
A second aspect of the embodiments of the present invention provides an apparatus, the apparatus comprising a memory for storing a program and a processor for performing the method of the first aspect and the respective implementation manners of the first aspect.
A third aspect of the embodiments of the present invention provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of the first aspect and implementations of the first aspect.
A fourth aspect of the embodiments of the present invention provides a computer readable storage medium having a computer program stored thereon, which when executed by a processor, implements the method of the first aspect and implementations of the first aspect.
Drawings
FIG. 1 is a schematic diagram of a data file storage method according to a first embodiment of the present invention;
FIG. 2 is a schematic diagram of a method for traversing a data file to recover an index file according to a second embodiment of the present invention;
fig. 3 is a schematic diagram of an apparatus structure of a data file storage device according to a third embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail below with reference to the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Before the present invention is further elaborated on by way of examples, several documents mentioned herein are briefly described below.
The data file mentioned in the embodiment of the invention is a file stored in the electrocardiograph locally. The file is mainly used for storing some data information related to patients and patient detection, and also comprises some information related to data file creation, such as: file type, data file name, file creation date, file creation time, patient identification, patient name, patient gender, patient age, patient test raw data (e.g., cardiac lead data, cardiac signal waveforms, etc.), patient measurement result data (e.g., cardiac data and typical cardiac data, etc.), patient analysis result data (e.g., cardiac classification and reporting, monitoring conclusion and reporting, etc.), and test device data (e.g., lead configuration, lead sampling configuration, etc.), etc.
The index file mentioned in the embodiment of the invention is a file stored in the electrocardiograph and used for establishing corresponding relation to all data files. The index file stores a record counter and a plurality of index records, each index record corresponding to a data file. The storage content of the index record comprises index record identification, data file name, file type, file creation date, file creation time, patient identification, patient name, patient gender, patient age, patient analysis result data and the like; the index record identification is used for uniquely identifying each index record, and the information such as the data file name, the file type, the file creation date, the file creation time, the patient identification, the patient name, the patient gender, the patient age, the patient analysis result data and the like is consistent with the information in the data file corresponding to the index record. Conventionally, after each data file is successfully created, a corresponding index record is added into the index file to be matched with the index file; after each data file is successfully deleted, the original index record corresponding to the data file in the index file is deleted. If the data file is to be modified, a plurality of modes can be processed, wherein one mode is to complete the processing operation of modifying the data file by adopting a mode of deleting before creating, and the index record in the corresponding index file is also deleted before adding.
After the electrocardiograph completes signal acquisition and analysis on a patient, the electrocardiograph needs to initiate a data file creation processing process to store the data related to the current patient on a local storage carrier; on the contrary, when the electrocardiograph executes the operations of exporting and discarding the patient data file, the electrocardiograph needs to initiate the process of deleting the data file to delete the data file which is stored on the local storage carrier and is related to the patient; as shown in fig. 1, which is a schematic diagram of a data file storage method according to a first embodiment of the present invention, the method mainly includes the following steps:
step 1, when an electrocardiograph starts a storage operation of a data file, setting a data storage instruction;
after the electrocardiograph finishes signal acquisition and analysis on a patient, a data file creation processing process is required to be initiated to store data related to the current patient on a local storage carrier, and specifically, after the electrocardiograph finishes signal acquisition and analysis, a data file storage operation is started; when the electrocardiograph executes the export and discarding operation of the patient data file, a data file deleting process is required to be initiated to delete the data file related to the patient stored on the local storage carrier, specifically, the storage operation of the data file is started when the electrocardiograph exports and discards the patient data file;
The data storage instruction comprises a data file creation instruction and a data file deletion instruction; the data file creation instruction comprises creation file name, data file type, identification data, name data, gender data, age data, electrocardiograph detection data, electrocardiograph measurement data, electrocardiograph diagnosis and treatment analysis data and electrocardiograph equipment parameters; the data file deleting instruction comprises a deleting file name.
The electrocardiograph is internally provided with an activation switch for starting the data file related storage operation by taking the data storage instruction, the electrocardiograph does not activate any processing flow related to the data file when the data storage instruction is empty, and the electrocardiograph can initiate a data file creation processing process or a data file deletion processing process related to the data file after the data storage instruction is specifically set;
if the data storage instruction is specifically set as a data file creation instruction, the data file creation processing process is initiated currently by the electrocardiograph; the instruction body of the data file creation instruction carries data information such as file name creation, data file type, identification data, name data, sex data, age data, electrocardiograph detection data, electrocardiograph measurement data, electrocardiograph diagnosis and treatment monitoring analysis data, electrocardiograph equipment parameters and the like;
If the data storage instruction is specifically set as a data file deleting instruction, the data file deleting processing process is initiated currently by the electrocardiograph; at least the deleting file name should be carried in the instruction body of the data file deleting instruction.
Step 2, the electrocardiograph executes file searching operation in a local storage carrier according to a preset index file name to generate a file handle identifier;
the method specifically comprises the following steps: the electrocardiograph performs file retrieval operation on all files stored in the storage carrier according to the index file names; if a file matching the index file name is retrieved, a unique identifier is allocated to the file to generate a file handle identifier; the file handle identifier is set to null if no file matching the index file name is retrieved.
Step 3, when the file handle identifier is not empty, the electrocardiograph sets the file corresponding to the file handle identifier as an index file;
the index file comprises a record counter and a plurality of index record data.
In summary, step 2-3 is to solve the problem of locating the index file. As described above, an index file must exist on the storage carrier of the electrocardiograph, and the index file is used for establishing the correspondence with all the data files; therefore, before the creation process or the deletion process is specifically performed on the data file, the index file needs to be positioned in advance; after the subsequent data file creation process or deletion process is completed, a corresponding record addition or record deletion operation is also performed on the index file. The file handle identifier generated in the operation process is a common return result (which can be understood as a pointer) for file retrieval processing in an embedded operation system of the electrocardiograph, and the electrocardiograph sets an access interface of a file corresponding to the handle according to the file handle identifier.
Step 4, when the data storage instruction is a data file creation instruction, the electrocardiograph executes a data file creation operation in the storage carrier to generate a data file storage structure, executes a data file setting operation on the data file storage structure, and then executes an index file record adding operation on the index file according to the data file storage structure to generate a data storage instruction state;
wherein the data file storage structure comprises a file data storage structure and a patient data storage structure; the file data storage structure at least comprises a file type, a data file name, a file creation date and a file creation time; the patient data storage structure includes a base data storage structure and a detection data storage structure; the underlying data storage structure includes at least a patient identification, a patient name, a patient gender, and a patient age; the detection data storage structure at least comprises patient detection raw data, patient measurement result data, patient analysis result data and detection equipment data;
the method specifically comprises the following steps: step 41, when the data storage instruction is a data file creation instruction, the electrocardiograph allocates a storage space with a variable size in the storage carrier to generate a data file storage structure;
Here, step 41 is a detailed description of the electrocardiograph performing the data file creation operation in the storage carrier to generate the data file storage structure in step 4; here, a typical electrocardiograph will call the file processing interface of the underlying operating system to partition an unoccupied storage space with a variable size on the storage carrier for constructing a data file, where we refer to the concrete form of the data file on the storage carrier as a data file storage structure; the data file storage structure can adopt a continuous storage mode or a fragment storage mode, and the specific implementation of the data file storage structure depends on engineering implementation requirements;
step 42, the electrocardiograph sets a file data storage structure of the data file storage structure; setting a data file name as a created file name in a data file creation instruction; setting a file type and creating a data file type in an instruction for the data file; acquiring date data of a system, and setting a file creation date; acquiring time data of a system, and setting file creation time;
here, as can be seen from the foregoing, the data file includes at least a file type, a data file name, a file creation date, a file creation time, a patient identification, a patient name, a patient sex, a patient age, patient detection raw data, patient measurement result data, patient analysis result data, and detection device data; for ease of understanding and operation, we group together these information into two major categories in the data file storage structure: a file data storage structure and a patient data storage structure; wherein, 1) the file data storage structure comprises information such as file type, data file name, file creation date, file creation time and the like; 2) Patient data storage structures fall into two categories: a base data storage structure and a detection data storage structure; the basic data storage structure specifically comprises information such as patient identification, patient name, patient gender, patient age and the like; the detection data storage structure comprises information such as patient detection original data, patient measurement result data, patient analysis result data, detection equipment data and the like; step 42, specifically setting a first large-class file data storage structure;
Step 43, electrocardiograph sets up the basic data storage structure of the patient data storage structure of the data file storage structure; setting the patient identification as identification data in a data file creation instruction; setting the name of the patient as name data in a data file creation instruction; setting sex data in a patient sex creation instruction for a data file; setting age data in an instruction for creating a data file by the age of a patient;
here, the electrocardiograph is configured to set a first sub-class base data storage structure of a second sub-class patient data storage structure according to data provided by the data file creation instruction;
step 44, the electrocardiograph sets a detection data storage structure of the patient data storage structure of the data file storage structure; setting the patient detection original data as electrocardiograph detection data in a data file creation instruction; setting electrocardiograph measurement data in a data file creation instruction of patient measurement result data; setting analysis result data of a patient, and creating electrocardiographic diagnosis and treatment monitoring analysis data in an instruction for the data file; setting electrocardio equipment parameters in an instruction for creating a data file by detecting equipment data;
here, the electrocardiograph is configured to set a second subclass detection data storage structure of the second major class patient data storage structure according to the data provided by the data file creation instruction;
In summary, steps 42-44 are detailed descriptions of the data file setting operation performed on the data file storage structure in step 4;
step 45, the electrocardiograph extracts a file data storage structure, a basic data storage structure and patient analysis result data from the data file storage structure to generate data file extraction data;
here, as can be seen from the foregoing, the stripe index record data in the index file includes: information such as index record identification, data file name, file type, file creation date, file creation time, patient identification, patient name, patient gender, patient age, patient analysis result data and the like; wherein the rest data except the index record identification are extracted from the corresponding data file, namely are obtained from the corresponding data file storage structure; the electrocardiograph acquires all necessary data except index record identification to form data file extraction data;
step 46, the electrocardiograph allocates an index record identifier to the data file extraction data, and generates new index record data according to the index record identifier and the data file extraction data;
here, in the index file, each index record has an index record identifier, where the index record identifier is a unique value, and here, the electrocardiograph allocates a value that does not conflict with all the index record identifiers existing in the index file to the data file to extract data; the allocation principle can be a sequential ordering mode, a random mode, a time stamp mode generated according to time data and the like, and the specific implementation of the allocation principle is determined by engineering implementation requirements; finally, completing data assembly of the newly added index record data according to the standard format of the index record data: newly added index record data=index record identification+data file extraction data;
Step 47, the electrocardiograph performs index record data adding operation on the newly added index record data to the index file to generate an index record data adding operation result;
the electrocardiograph establishes a corresponding relation between the index file and the newly built data file in the index file in a mode of adding index record data, wherein the newly added index record data is newly added index record data prepared in the step;
in step 48, when the result of the index record data adding operation is that the adding is successful, the electrocardiograph adds 1 to the value of the record counter in the index file, and sets the data storage instruction state to be that the instruction execution is successful.
Here, the index file has a total counter (record counter) for all index record data, and the data enables the electrocardiograph to directly obtain the total number of the index record data without additionally carrying out full polling on the index record data, so that the processing efficiency of the electrocardiograph is improved;
regarding the operation principle of the record counter, 1 adding operation is required when adding record data, 1 subtracting operation is required when deleting record data, and the record counter cannot be negative; and, only after the index record data adding operation succeeds, the record counter can be added with 1, because the record is not successfully added due to the error of the access interface of the storage carrier, and the deviation of the actual total number of the index record data and the value of the record counter can be caused if the operation result is not judged;
In summary, steps 45-48 are detailed descriptions of the data storage instruction state generated by performing the index file record adding operation on the index file according to the data file storage structure in step 4.
Step 5, when the data storage instruction is a data file deleting instruction, the electrocardiograph executes a data file deleting operation in the storage carrier, and executes an index file record deleting operation on the index file to generate a data storage instruction state;
the method specifically comprises the following steps: step 51, the electrocardiograph executes a storage space releasing operation on a data file storage structure corresponding to the deleted file name in a storage carrier;
here, step 51 is a detailed description of the data file deletion operation performed in the storage carrier in step 5; here, the general electrocardiograph will call the file processing interface of the underlying operating system to release the storage space with variable size previously divided into the data files (deleting the data file storage structure corresponding to the file name) on the storage carrier, if the data file storage structure is stored in the continuous storage mode, the space of the continuous storage is marked as unoccupied, if the related fragments are marked as unoccupied and the defragmentation operation is performed in the fragment storage mode, and of course, the processing mode can be also different, and the specific implementation of the processing mode depends on the engineering implementation requirement;
Step 52, in the index file, the electrocardiograph performs index record data deleting operation on the index record data corresponding to the deleted file name to generate an index record data deleting operation result;
here, in the index file, the corresponding relation between the index file and the deleted data file is released by deleting the index record data; the specific operation is that all index record data of the index file are polled, whether the file names of stored data stored in the index record data are equal to the deleted file names is compared, if so, the index record is the corresponding record of the deleted data file, and the corresponding record needs to be deleted from the index file;
step 53, when the deletion operation result of the index record data is that the deletion is successful, the electrocardiograph decrements the value of the record counter in the index file by 1, and sets the data storage instruction state to be the instruction execution success.
Here, the record counter can be decremented by 1 only after the operation of deleting the index record data is successful, because the record may not be successfully deleted due to the error of the access interface of the storage carrier, and if the operation result is not judged, the deviation of the actual total number of the index record data and the value of the record counter may be caused;
In summary, steps 52-53 are detailed descriptions of the data storage instruction state generated by performing the index file record deletion operation on the index file in step 5.
And 6, when the data storage instruction state is that the instruction execution is successful, the electrocardiograph sets the data storage instruction to be empty.
Here, after all steps are performed, because the electrocardiograph uses the data storage instruction as an activation switch for starting the related operation of the data file, the data storage instruction is emptied after the activated processing flow is finished, otherwise, the electrocardiograph may generate a storage error due to repeated file creation or file deletion.
Whether the electrocardiograph starts the creation or deletion process flow on the data file, the positioning of the index file is needed in advance, and in practical application, the positioning of the index file may occur that the searching of the index file fails, at this time, the electrocardiograph provides a process flow for recovering the index file, as shown in fig. 2, which is a schematic diagram of a method for traversing the data file to recover the index file, the method mainly includes the following steps:
step 101, when an electrocardiograph locates an index file, performing file searching operation in a local storage carrier according to a preset index file name to generate a file handle identifier;
The method specifically comprises the following steps: the electrocardiograph performs file retrieval operation on all files stored in the storage carrier according to the index file names; if a file matching the index file name is retrieved, a unique identifier is allocated to the file to generate a file handle identifier; the file handle identifier is set to null if no file matching the index file name is retrieved.
Here, a lookup process is performed on the index file, and this process is invoked in all storage management processes of the data file. In addition, if the electrocardiograph wants to retrieve the index file data, the instruction may be initiated separately to start the procedure.
102, when the file handle identifier is empty, the electrocardiograph sets an automatic reconstruction index file identifier;
wherein automatically reconstructing the index file identifier includes automatically reconstructing and manually reconstructing.
Here, when the file handle identifier is empty, it is indicated that the index file is lost or a data error occurs; in this case, the electrocardiograph may perform error prompt on the index file to the user through the man-machine interface, and provide two reconstruction modes to the user for selection: automatic reconstruction and manual reconstruction; correspondingly, an automatic reconstruction index file identifier is arranged in the electrocardiograph to store the selection result of the user; when the automatic reconstruction index file identifier is specifically set to be automatically reconstructed, the electrocardiograph starts a processing flow related to the automatic reconstruction; when the automatically reconstructed index file identifier is specifically set to be manually reconstructed, the electrocardiograph considers that the user manually copies the backed up index file to the electrocardiograph.
Step 103, when the automatic reconstruction of the index file identifier is automatic reconstruction, traversing all data file storage structures on the storage carrier by the electrocardiograph, and performing file reconstruction operation on the index file to generate the index file;
the method specifically comprises the following steps: step 1031, when the automatic reconstruction index file identifier is automatic reconstruction, the electrocardiograph performs an index file creation operation in the storage carrier according to the index file name to generate an index file;
the index file comprises a record counter and a plurality of index record data;
here, firstly, the electrocardiograph needs to re-create an empty index file, and after creating, a record counter in the index file is initially set to 0, and index record data in the index file is empty;
step 1032, the electrocardiograph polls all data file storage structures on the storage carrier in turn; extracting file data storage structure, basic data storage structure and patient analysis result data of the polled data file storage structure to generate data file extraction data; distributing an index record identifier for the data file extraction data, and generating newly added index record data according to the index record identifier and the data file extraction data; performing index record data adding operation on the newly added index record data to generate an index record data adding operation result, and adding 1 to the value of a record counter in the index file when the index record data adding operation result is that the adding is successful;
Wherein the data file storage structure comprises a file data storage structure and a patient data storage structure; the file data storage structure at least comprises a file type, a data file name, a file creation date and a file creation time; the patient data storage structure includes a base data storage structure and a detection data storage structure; the underlying data storage structure includes at least a patient identification, a patient name, a patient gender, and a patient age; the test data storage structure includes at least patient test raw data, patient measurement result data, patient analysis result data, and test device data.
Here, to restore the content of the empty index file, the electrocardiograph needs to re-count the information of all the data files on the storage carrier (by polling the data files), extract and add the information to the index file, so as to complete the reconstruction of the correspondence between the data files and the index file. As can be seen from the foregoing, the stripe index record data in the index file includes: information such as index record identification, data file name, file type, file creation date, file creation time, patient identification, patient name, patient gender, patient age, patient analysis result data and the like; the remaining data except for the index record identification is extracted from the corresponding data file.
The specific operation of polling is to locate all data files one by one: and (3) carrying out extraction of index record identification, data file name, file type, file creation date, file creation time, patient identification, patient name, patient sex, patient age and patient analysis result data on each positioned data file to form an extraction information (data file extraction data), reassigning a unique index record identification and the extraction information (data file extraction data) to be combined and spliced into standard index record data (newly added index record data), adding the newly added index record data to the index file, and synchronously adding the value of a record counter by 1 at the same time.
After the polling is finished, the index file comprises index record data corresponding to all the data files, and the creation or deletion process flow of the data files can be normally executed again on the basis of the index record data.
Fig. 3 is a schematic diagram of an apparatus structure of a data file storage device according to a third embodiment of the present invention, where the apparatus includes: a processor and a memory. The memory may be coupled to the processor via a bus. The memory may be non-volatile memory, such as a hard disk drive and flash memory, in which software programs and device drivers are stored. The software program can execute various functions of the method provided by the embodiment of the invention; the device driver may be a network and interface driver. The processor is configured to execute a software program, where the software program is executed to implement the method provided by the embodiment of the present invention.
It should be noted that the embodiment of the present invention also provides a computer readable storage medium. The computer readable storage medium stores a computer program, which when executed by a processor, can implement the method provided by the embodiment of the present invention.
Embodiments of the present invention also provide a computer program product comprising instructions. The computer program product, when run on a computer, causes the processor to perform the above method.
According to the data file storage method and device provided by the embodiment of the invention, the corresponding relation between the data file and the index file is established by designing the data file creation instruction processing flow; the corresponding relation between the index file and the data file is ensured not to be damaged by designing a data file deleting instruction processing flow; the key information in the data file is extracted from the data file creation instruction processing flow and is used as index record data to be stored in the index file, so that the electrocardiograph can directly acquire the data file information from the index record; by using the method and the device for storing and managing the data file, the file traversing efficiency and the file information acquisition efficiency of the electrocardiograph can be improved, and the problems of common false dead halt, interface pause and the like of the conventional electrocardiograph after the large-capacity storage carrier is loaded are solved.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of function in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The foregoing description of the embodiments has been provided for the purpose of illustrating the general principles of the invention, and is not meant to limit the scope of the invention, but to limit the invention to the particular embodiments, and any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the invention are intended to be included within the scope of the invention.

Claims (8)

1. A method of storing a data file, the method comprising:
setting a data storage instruction; the data storage instruction comprises a data file creation instruction and a data file deletion instruction;
according to the preset index file name, performing file searching operation in a local storage carrier to generate a file handle identifier;
when the file handle identifier is not empty, setting a file corresponding to the file handle identifier as an index file;
when the data storage instruction is the data file creation instruction, executing a data file creation operation in the storage carrier to generate a data file storage structure, executing a data file setting operation on the data file storage structure, and executing an index file record adding operation on the index file according to the data file storage structure to generate a data storage instruction state;
when the data storage instruction is the data file deleting instruction, executing data file deleting operation in the storage carrier, and executing index file record deleting operation on the index file to generate the data storage instruction state;
when the data storage instruction state is that the instruction execution is successful, setting the data storage instruction to be empty;
Wherein, the index file comprises a record counter and a plurality of index record data;
the data file creation instruction comprises creation file names, data file types, identification data, name data, gender data, age data, electrocardiograph detection data, electrocardiograph measurement data, electrocardiograph diagnosis and treatment monitoring analysis data and electrocardiograph equipment parameters;
the data file deleting instruction comprises a deleting file name;
the data file storage structure comprises a file data storage structure and a patient data storage structure; the file data storage structure at least comprises a file type, a data file name, a file creation date and a file creation time; the patient data storage structure includes a base data storage structure and a detection data storage structure; the base data storage structure includes at least a patient identification, a patient name, a patient gender, and a patient age; the detection data storage structure at least comprises patient detection original data, patient measurement result data, patient analysis result data and detection equipment data;
the executing the data file setting operation on the data file storage structure specifically includes:
setting the file data storage structure of the data file storage structure; setting the data file name as the created file name in the data file creation instruction; setting the file type as the data file type in the data file creation instruction; acquiring date data of a system, and setting the file creation date; acquiring time data of a system, and setting the file creation time;
Setting the base data storage structure of the patient data storage structure of the data file storage structure; setting the patient identification as the identification data in the data file creation instruction; setting the last name of the patient as the name data in the data file creation instruction; setting the sex of the patient as the sex data in the data file creation instruction; setting the age of the patient as the age data in the data file creation instruction;
setting the detection data storage structure of the patient data storage structure of the data file storage structure; setting the patient detection original data as the electrocardiographic detection data in the data file creation instruction; setting the patient measurement result data as the electrocardiograph measurement data in the data file creation instruction; setting the patient analysis result data as the electrocardiographic diagnosis and treatment monitoring analysis data in the data file creation instruction; setting the data of the detection equipment as the electrocardio equipment parameters in the data file creation instruction;
the step of performing an index file record adding operation on the index file according to the data file storage structure to generate a data storage instruction state specifically includes:
Extracting the file data storage structure, the base data storage structure and the patient analysis result data from the data file storage structure to generate data file extraction data;
distributing an index record identifier for the data file extraction data, and generating new index record data according to the index record identifier and the data file extraction data;
performing index record data adding operation on the newly added index record data to the index file to generate an index record data adding operation result;
and when the adding operation result of the index record data is that the adding is successful, adding 1 to the value of the record counter in the index file, and setting the data storage instruction state as that the instruction execution is successful.
2. The method for storing data files according to claim 1, wherein the file handle identifier is generated by performing a file search operation in a local storage carrier according to a preset index file name, specifically comprising:
according to the index file name, performing file retrieval operation on all files stored in the storage carrier; if a file matching the index file name is retrieved, assigning a unique identifier to the file to generate the file handle identifier; and if the file matched with the index file name is not retrieved, setting the file handle identifier to be null.
3. The data file storage method of claim 1, wherein performing a data file creation operation in the storage carrier generates a data file storage structure, comprising:
in the storage carrier, a variable-size storage space is allocated to generate the data file storage structure.
4. The data file storage method according to claim 1, wherein said performing a data file deletion operation in said storage carrier comprises:
and in the storage carrier, executing a storage space releasing operation on the data file storage structure corresponding to the deleted file name.
5. The method according to claim 1, wherein said performing an index file record delete operation on said index file generates said data storage instruction state, comprising:
in the index file, performing index record data deleting operation on the index record data corresponding to the deleted file name to generate an index record data deleting operation result;
and when the result of the index record data deleting operation is that the deleting is successful, subtracting 1 from the value of the record counter in the index file, and setting the data storage instruction state as that the instruction execution is successful.
6. The data file storage method of claim 1, wherein the method further comprises:
when the file handle identifier is empty, setting an automatic reconstruction index file identifier; the automatic reconstruction index file identifier comprises automatic reconstruction and manual reconstruction;
and traversing all the data file storage structures on the storage carrier when the automatic reconstruction index file identifier is the automatic reconstruction, and performing file reconstruction operation on the index file.
7. An apparatus, a packet memory and a processor, wherein the memory is for storing a program, and the processor is for performing the method of any of claims 1 to 6.
8. A computer readable storage medium comprising instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1 to 6.
CN202010205060.2A 2020-03-20 2020-03-20 Data file storage method and device Active CN111400258B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010205060.2A CN111400258B (en) 2020-03-20 2020-03-20 Data file storage method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010205060.2A CN111400258B (en) 2020-03-20 2020-03-20 Data file storage method and device

Publications (2)

Publication Number Publication Date
CN111400258A CN111400258A (en) 2020-07-10
CN111400258B true CN111400258B (en) 2023-07-14

Family

ID=71432764

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010205060.2A Active CN111400258B (en) 2020-03-20 2020-03-20 Data file storage method and device

Country Status (1)

Country Link
CN (1) CN111400258B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113268556A (en) * 2021-06-09 2021-08-17 中航材导航技术(北京)有限公司 Novel storage format and method for chart data file
CN115391284B (en) * 2022-10-31 2023-02-03 四川大学华西医院 Method, system and computer readable storage medium for quickly identifying gene data file

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0798654A1 (en) * 1996-03-29 1997-10-01 Sun Microsystems, Inc. Converting handle-based find first/find next/find close to non-handle based find first/find next
CN107168905A (en) * 2017-05-11 2017-09-15 广东欧珀移动通信有限公司 A kind of document display method, device, storage medium and mobile terminal

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7849112B2 (en) * 2003-09-03 2010-12-07 Emc Corporation Using a file handle for associating the file with a tree quota in a file server
US7680844B2 (en) * 2007-05-18 2010-03-16 International Business Machines Corporation Method for preserving virtual filesystem information across high availability takeover
CN104042210B (en) * 2014-07-04 2015-10-28 深圳市凯沃尔电子有限公司 A kind of digital electrocardiograph and system thereof
CN105630779A (en) * 2014-10-27 2016-06-01 杭州海康威视系统技术有限公司 Hadoop distributed file system based small file storage method and apparatus
CN104516974B (en) * 2014-12-26 2018-03-13 华为技术有限公司 A kind of management method and device of file system directories item
CN104750858A (en) * 2015-04-16 2015-07-01 成都影泰科技有限公司 Network-based data storage method
CN105138581B (en) * 2015-07-31 2018-08-21 北京无线天利移动信息技术股份有限公司 A kind of write-in of mobile message and read method and system
CN107992504A (en) * 2016-10-26 2018-05-04 中兴通讯股份有限公司 A kind of document handling method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0798654A1 (en) * 1996-03-29 1997-10-01 Sun Microsystems, Inc. Converting handle-based find first/find next/find close to non-handle based find first/find next
CN107168905A (en) * 2017-05-11 2017-09-15 广东欧珀移动通信有限公司 A kind of document display method, device, storage medium and mobile terminal

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Manolis Terrovitis.et al.A combination of trie-trees and inverted files for the indexing of set-valued attributes.CIKM '06: Proceedings of the 15th ACM international conference on Information and knowledge management .2006,第728–737页. *
虚拟机文件取证分析;钟琳等;计算机工程;第76-82页 *

Also Published As

Publication number Publication date
CN111400258A (en) 2020-07-10

Similar Documents

Publication Publication Date Title
CN111400258B (en) Data file storage method and device
CN107040578B (en) Data synchronization method, device and system
CN110569214B (en) Index construction method and device for log file and electronic equipment
US8121984B2 (en) Method and system for archiving biomedical data generated by a data collection device
CN111782635B (en) Data processing method and device, storage medium and electronic device
CN110503151A (en) A kind of processing method and system of image
CN112256738A (en) Medical linkage DRG quality control query method, device and system
CN109087690B (en) Medical data processing system based on cloud computing
CN113761059A (en) Data processing method and device
CN111414335B (en) Data file searching method and device
CN114168544A (en) Clinical test data processing method and device, computer equipment and storage medium
JPH0399380A (en) Method for storing collected data
CN111429987B (en) Index file-based searching method and device
CN117711577A (en) Image file compression storage method and device, electronic equipment and storage medium
CN116959729A (en) Method and device for risk assessment based on intelligent selection risk prediction model
CN113127360A (en) Medical image artificial intelligence auxiliary diagnosis software test service method and system
WO2023109063A1 (en) Data storage method for magnetic resonance scanning, and magnetic resonance scanning method and system
CN113178250A (en) Information management system integrating image and scientific research service
CN115907982A (en) System for generating dynamic transaction data in electric power transaction market
JP2001109829A (en) System and method for confirming inspection result, and storage medium
CN112289394A (en) Case subscription method and device for disease library, storage medium and terminal
CN114783583A (en) Medical equipment cleaning control method, system and storage medium
CN114493498A (en) Central control system for clinical test
CN113674868A (en) Method, device, equipment and storage medium for acquiring clinical research data
CN117216162A (en) Experimental data processing method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant