CN111414335A - Data file searching method and device - Google Patents

Data file searching method and device Download PDF

Info

Publication number
CN111414335A
CN111414335A CN202010206363.6A CN202010206363A CN111414335A CN 111414335 A CN111414335 A CN 111414335A CN 202010206363 A CN202010206363 A CN 202010206363A CN 111414335 A CN111414335 A CN 111414335A
Authority
CN
China
Prior art keywords
file
index
record
data
storage
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.)
Granted
Application number
CN202010206363.6A
Other languages
Chinese (zh)
Other versions
CN111414335B (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 CN202010206363.6A priority Critical patent/CN111414335B/en
Publication of CN111414335A publication Critical patent/CN111414335A/en
Application granted granted Critical
Publication of CN111414335B publication Critical patent/CN111414335B/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/14Details of searching files based on file metadata
    • G06F16/148File search processing
    • 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
    • G16H40/00ICT specially adapted for the management or administration of healthcare resources or facilities; ICT specially adapted for the management or operation of medical equipment or devices
    • G16H40/60ICT specially adapted for the management or administration of healthcare resources or facilities; ICT specially adapted for the management or operation of medical equipment or devices for the operation of medical equipment or devices
    • G16H40/67ICT specially adapted for the management or administration of healthcare resources or facilities; ICT specially adapted for the management or operation of medical equipment or devices for the operation of medical equipment or devices for remote operation
    • 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)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Library & Information Science (AREA)
  • Business, Economics & Management (AREA)
  • General Engineering & Computer Science (AREA)
  • Epidemiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Primary Health Care (AREA)
  • Public Health (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 method and a device for searching a data file, wherein the method comprises the following steps: the electrocardiograph reads the file according to the index file name to generate an index file reading result and an index file data set; when the index file is successfully read, verifying the total number of the index records to generate a total index record verification result; when the total number of the index records is successfully verified, selecting a data file according to the index file data set to generate a current index record identifier; extracting a data file name of the index record corresponding to the current index record identifier from the index file data set to generate a current data file name; reading a file according to the current data file name to generate a data file reading result and a data file data set; and setting the data file searching result as successful searching when the data file is successfully read and the data file data set is not empty.

Description

Data file searching method and device
Technical Field
The invention relates to the technical field of electrocardio data processing, in particular to a data file searching method and device.
Background
Along with the development of electronic technology and medical technology, the use of electrocardiographs is becoming more and more popular in China. The conventional electrocardiograph not only has the electrocardiograph function and the real-time data observation and storage function, but also can edit, store, measure, analyze and diagnose, report and print and remotely transmit the stored data. And, can also carry out batch comparison, analysis and statistics to a large amount of inventory data.
When used inventory data is located on an electrocardiogram workstation or a cloud platform, a data file can be searched and acquired by directly utilizing a high-efficiency engine of a remote professional database in an online mode, so that smooth experience of a user is guaranteed.
When the inventory data used is located on a storage carrier local to the device, some problems arise in practical applications with the rapid expansion of the capacity of the storage carrier. The data storage mode of the current conventional electrocardiograph is usually stored in an independent data file mode, that is, all information related to a patient is uniformly packaged into a data whole and then stored on a local storage carrier of the device in the form of a single data file. For the original small-capacity storage carrier (capable of storing dozens of patient data files to hundreds of patient data files), the storage mode can complete the searching and data acquisition of the data files by using the traditional file traversal query method based on the linear linked list, and the searching process can not cause the long time consumption of the device processor and the bad feeling of service pause for users. However, with the rapid expansion and cost reduction of the storage carrier in the market, when the conventional electrocardiograph also has mass data storage capacity (at least thousands or even tens of thousands of files can be stored), if the storage mode still uses the previous file traversal method to search for the data file, the time consumption of the device processor is too long due to too many traversed files, and thus, the bad experiences of false halt, interface pause and the like are caused to the user.
Disclosure of Invention
The invention aims to provide a data file searching method and a device aiming at the defects of the prior art, and during full-text traversal, the traditional linear linked list traversal mode is replaced by an index file data set reading mode of a single index file, so that the traversal time is shortened; when a single file is searched, the traditional linear linked list positioning mode is replaced by the positioning mode of combining the index file with the file storage list, so that the positioning efficiency is improved; and the two processes of full-text traversal and single file search are uniformly packaged by providing an interactive interface with a user. By using the method and the device provided by the invention, the electrocardiograph can easily complete the list display and file searching operation of mass files stored in local, the processing period of the file searching in the business process can be effectively shortened, the use resources of the equipment memory are saved, and the use experience of a user is improved.
In order to achieve the above object, a first aspect of the embodiments of the present invention provides a method for searching a data file, where the method includes:
the electrocardiograph uses a file storage list stored on a storage carrier of the electrocardiograph according to a default index file name to perform file reading operation on a file corresponding to the index file name on the storage carrier, and an index file reading result and an index file data set are generated; the index file data set comprises a record counter and a plurality of index records; the index record at least comprises an index record identifier and a data file name;
when the reading result of the index file is successful, the electrocardiograph counts the total number of the index records included in the index file data set to generate an index record total number, and performs index record total number verification operation on the index record total number by using the record counter to generate an index record total number verification result;
when the total index record number verification result is successful verification, the electrocardiograph performs data file selection operation according to the index file data set to generate a current index record identifier;
the electrocardiograph extracts the data file name of the index record corresponding to the current index record identifier from the index file data set according to the current index record identifier to generate a current data file name;
the electrocardiograph uses the file storage list to read files corresponding to the current data file name on the storage carrier according to the current data file name, and generates a data file reading result and a data file data set;
and when the data file reading result is that the reading is successful and the data file data set is not empty, setting the data file searching result as the successful searching by the electrocardiograph.
Preferably, the first and second liquid crystal materials are,
the index record further comprises a file type, a file creation date, a file creation time, a patient identification, a patient name, a patient gender, a patient age, and a patient analysis result;
the file storage list comprises a plurality of file storage records; the file storage record at least comprises a storage file name and file physical storage position information.
Preferably, the electrocardiograph performs a file reading operation on a file corresponding to the index file name on a storage carrier of the electrocardiograph by using a file storage list stored on the storage carrier according to a default index file name, and generates an index file reading result and an index file data set, specifically including:
the electrocardiograph initializes the reading result of the index file as reading failure and initializes the data set of the index file as null;
the electrocardiograph polls the file storage records included in the file storage list according to the index file name; and when the storage file name included in the file storage record is equal to the index file name, acquiring physical storage data of an index file from the storage carrier according to the file physical storage location information included in the file storage record to generate an index file data set, and setting the index file reading result as the successful reading.
Preferably, the performing, by using the record counter, an index record total number verification operation on the index record total number to generate an index record total number verification result specifically includes:
and the electrocardiograph judges whether the recording counter is equal to the total number of the index records or not, sets the total number of the index records as a verification result as successful verification when the recording counter is equal to the total number of the index records, and sets the total number of the index records as failed verification when the recording counter is not equal to the total number of the index records.
Preferably, when the total number of index records is successfully verified, the electrocardiograph performs data file selection operation according to the index file data set to generate a current index record identifier, which specifically includes:
when the total index record number verification result is that the verification is successful, the electrocardiograph uses the index file data set to generate a file list, and performs file list display operation on a user according to the file list; the electrocardiograph also provides a file record selection function for the user; the file list comprises a plurality of file records; the file records of the file list and the index records of the index file data set are in one-to-one correspondence;
the electrocardiograph generates a current file record according to a file record selection result of the user on the file list; and extracting the index record identifier of the index record corresponding to the current file record from the index file data set to generate the current index record identifier.
Preferably, the generating of the current data file name by the electrocardiograph extracting the data file name of the index record corresponding to the current index record identifier from the index file data set according to the current index record identifier specifically includes:
the electrocardiograph initializes the name of the current data file to be null;
the electrocardiograph polls the index records included in the index file data set according to the current index record identification; and when the index record identifier included in the index record is equal to the current index record identifier, extracting the data file name included in the index record to generate the current data file name.
Preferably, the electrocardiograph performs a file reading operation on a file corresponding to the current data file name on the storage carrier by using the file storage list according to the current data file name, and generates a data file reading result and a data file data set, specifically including:
the electrocardiograph initializes the reading result of the data file as reading failure and initializes the data set of the data file as null;
the electrocardiograph polls the file storage records included in the file storage list according to the current data file name; and when the storage file name included in the file storage record is equal to the current data file name, acquiring physical storage data of the current data file from the storage carrier according to the file physical storage location information included in the file storage record to generate the data file data set, and setting the data file reading result as the successful reading.
Preferably, the method further comprises: and when the reading result of the index file is that the reading fails, the electrocardiograph uses the file storage list to reconstruct the index file.
In the data file searching method provided by the first aspect of the embodiment of the invention, during full-text traversal, the electrocardiograph replaces the traditional linear linked list traversal mode with the index file data set reading mode of a single index file, so that the traversal time is shortened; when a single file is searched, the electrocardiograph replaces the traditional linear linked list positioning mode by combining the index file with the file storage list, so that the positioning efficiency is improved; and an interactive interface with a user is provided through the electrocardiograph, so that the two processes of full-text traversal and single file searching are packaged uniformly.
A second aspect of an embodiment of the present invention provides an apparatus, which includes a memory and a processor, where the memory is used to store a program, and the processor is used to execute the first aspect and the method in each implementation manner of the first aspect.
A third aspect of embodiments of the present invention provides a computer program product including instructions, which, when run on a computer, cause the computer to perform the first aspect and the method in each implementation manner of the first aspect.
A fourth aspect of the embodiments of the present invention provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the first aspect and the methods in the implementation manners of the first aspect.
Drawings
Fig. 1 is a schematic diagram of a data file searching method according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating an error handling method for 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 searching apparatus 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 clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Before the present invention is explained in further detail by way of examples, a brief description of several documents of electrocardiographs mentioned herein is provided.
The data file, which is mentioned in the embodiment of the present invention, is a file stored locally in the electrocardiogram machine. The file is mainly used for storing some data information related to patients and patient detection, and also includes 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 electrocardiographic waveform, patient measurement, patient analysis, patient heartbeat information, patient representative heartbeat data, patient lead data, device parameters, and the like.
The index file, which is mentioned in the embodiment of the present invention, is a file stored locally in the electrocardiogram machine and used for establishing a corresponding relationship with all data files. The index file stores a record counter and a plurality of index records, and each index record corresponds to one 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 sex, patient age, patient analysis result and the like; the index record identification is used for uniquely identifying each index record, and information such as a data file name, a file type, a file creation date, a file creation time, a patient identification, a patient name, a patient sex, a patient age, a patient analysis result and the like is consistent with information in the data file corresponding to the index record. Conventionally, after each data file is successfully created, a corresponding index record is added to the index file to match the index record.
The file storage list, which is mentioned in the embodiments of the present invention, is a vector table stored locally in the electrocardiogram machine and used for establishing a correspondence between a storage file name and file physical storage location information for all files (including index files, data files, and other files). The file storage list comprises a plurality of file storage records; each file storage record corresponds to one file; each file storage record includes at least two data: storing a file name (the corresponding index file is the index file name, the corresponding data file is the data file name) and file physical storage location information (the actual physical storage address or area information on the storage carrier). Each write operation (create, modify, delete) to a file will modify the table accordingly. The File storage list may be in a custom format of the embedded operating system, or may also adopt a common data format such as a 16-bit File Allocation Table (FAT 16), a 32-bit File Allocation Table (FAT 32), and the specific implementation is determined according to the engineering implementation requirements.
In specific use, an electrocardiograph often involves providing a user with list browsing of searched files through a human-computer interaction interface, and extracting corresponding specific information of a file according to a file selected by the user on the human-computer interaction interface, as shown in fig. 1, which is a schematic diagram of a data file searching method provided in an embodiment of the present invention, the method mainly includes the following steps:
step 1, the electrocardiograph uses a file storage list stored on a storage carrier of the electrocardiograph to read files corresponding to index file names on the storage carrier according to default index file names, and an index file reading result and an index file data set are generated;
the electrocardiograph provides a plurality of human-computer interaction interface modes for users: an Application Program Interface (API) mode, a command mode using a command console, or a window mode in which a display device is used to present a visual Interface; the file query processing flow started in the step 1 has a customized activation means under each interactive mode: the method comprises the following steps that a user uses a customized file list acquisition interface to activate in an API mode, the user uses information input equipment such as a keyboard and a mouse of an electrocardiograph to input a file list acquisition instruction to activate in an instruction mode, and the user uses the information input equipment such as the keyboard, the mouse and a touch screen of the electrocardiograph to click a file list function provided in the interface in a window mode to generate a file list acquisition instruction to activate; in addition, the three modes are not limited to the electrocardiograph, and can also be equipment with API, instruction desk and window capability, such as a mobile phone, a PAD, a computer and the like, which is connected with the electrocardiograph through a network;
the storage carrier mentioned herein is a storage medium used for storing all files (including index files, data files, file storage lists, etc.) locally for the electrocardiograph, and the specific implementation of the storage carrier can be an independent storage medium on the electrocardiograph or a combined storage body composed of a plurality of independent storage media;
the index file data set comprises a record counter and a plurality of index records; the index record comprises an index record identifier, a data file name, a file type, a file creation date, a file creation time, a patient identifier, a patient name, a patient sex, a patient age and a patient analysis result;
the file storage list comprises a plurality of file storage records; the file storage record at least comprises a storage file name and file physical storage position information;
the method specifically comprises the following steps: step 11, initializing the index file by the electrocardiograph, wherein the reading result of the index file is reading failure, and the data set of the index file is empty;
if the subsequent steps cannot be normally completed, on one hand, the reading result of the index file does not need to be judged and set, and on the other hand, the electrocardiogram activates the reconstruction processing process of the index file according to the reading failure state of the index file;
step 12, the electrocardiograph polls the file storage records included in the file storage list according to the default index file name; and when the storage file name included in the file storage record is equal to the index file name, acquiring the physical storage data of the index file from the storage carrier according to the file physical storage position information included in the file storage record to generate an index file data set, and setting the index file reading result as the successful reading.
The default file name is set for the habitual operation of the index file, so that the electrocardiograph does not need to perform secondary screening acquisition processing on the name when performing the operation of the index file, operation steps can be saved, and the file access efficiency can be improved; assuming that the index file name defaults to IXF, assume that the file storage list includes 3 file storage records: file storage record 1 (storage file name is IXC, file physical storage location information is address 1), file storage record 2 (storage file name is IXF, file physical storage location information is address 2), and file storage record 3 (storage file name is IX, file physical storage location information is address 3); when polling is carried out on the file storage records included in the file storage list, when the file storage record 1 is polled, the file storage record 2 is switched to because the storage file name is not equal to the index file name; when polling to the file storage record 2, the current polling is stopped because the storage file name is equal to the index file name, and all the storage data of the index file are acquired from the storage space pointed by the address 2 of the file storage record 2 to generate an index file data set. After the electrocardiograph acquires the index file data set from the index file, the traversal search of all the data files on the storage carrier is completed.
Step 2, when the reading result of the index file is successful, counting the total number of index records included in the index file data set by the electrocardiograph to generate the total number of index records, and performing the total number of index records verification operation on the total number of index records by using a record counter to generate the total number of index records verification result;
the method specifically comprises the following steps: when the reading result of the index file is that the reading is successful, counting the total number of the index records included in the index file data set by the electrocardiograph to generate the total number of the index records; and judging whether the record counter is equal to the total number of the index records or not, setting the total number of the index records as verification success when the record counter is equal to the total number of the index records, and setting the total number of the index records as verification failure when the record counter is not equal to the total number of the index records.
Here, the record counter of the index file data set is modified after the index record is operated (added or deleted) each time, and if unpredictable accidents such as power failure occur during modification, modification failure may be caused, so that the counter is not matched with the total number of actual index records; therefore, after the data of the index file is acquired, the number of records of the index file needs to be corrected; the specific proofreading principle is to compare whether the actual total number of index records is equal to the value of the record counter, and if the actual total number of index records is not equal to the value of the record counter (the proofreading fails), the conventional processing is to stop the file searching processing flow and activate the corresponding processing flow in the electrocardiogram machine.
Step 3, when the total index record number verification result is successful, the electrocardiograph performs data file selection operation according to the index file data set to generate a current index record identifier;
the method specifically comprises the following steps: step 31, the electrocardiograph generates a file list by using the index file data set, and performs file list display operation to a user according to the file list; the electrocardiograph also provides a file record selection function for the user while displaying the file list for the user;
wherein the file list comprises a plurality of file records; the file records of the file list and the index records of the index file data set are in one-to-one correspondence;
here, the electrocardiograph copies all index records of the index file data set to a file list, and the file list is also composed of a plurality of file records, so that each file record realizes a one-to-one correspondence relationship with the index records in the index file data set;
then, the electrocardiograph displays a file list to the user based on different human-computer interaction modes: under the API mode, providing a file list for an application program through an application program interface; under the instruction mode, a file list is presented to a user through an instruction console; under a window mode, a file list interface is presented to a user through display equipment of the electrocardiograph;
step 32, the electrocardiograph generates a current file record according to a file record selection result of the user on the file list; and extracting the index record identifier of the index record corresponding to the current file record from the index file data set to generate a current index record identifier.
Here, the electrocardiograph obtains a file record selection result of the user on the file list based on different human-computer interaction modes to generate a current file record: under the API mode, acquiring a file record selection result transmitted to the electrocardiograph by a user through an application program interface to generate a current file record; under the instruction mode, acquiring a file record selection result input by a user through information input equipment such as a keyboard, a mouse and the like of the electrocardiograph to generate a current file record, and under the window mode, acquiring a file record selection result clicked by the user through the information input equipment such as the keyboard, the mouse, a touch screen and the like of the electrocardiograph to generate a current file record;
the electrocardiograph may then extract the index identifier from the index record corresponding to the file record to generate a current index identifier (the index record identifier of the currently selected index record).
Step 4, the electrocardiograph extracts the data file name of the index record corresponding to the current index record identifier from the index file data set according to the current index record identifier to generate a current data file name;
the method specifically comprises the following steps: step 41, initializing the file name of the current data to be null by the electrocardiograph;
step 42, the electrocardiograph polls the index records included in the index file data set according to the current index record identification; and when the index record identifier included in the index record is equal to the current index record identifier, extracting the data file name included in the index record to generate the current data file name.
Here, assuming that the current index record is identified as 2, the index file data set includes 2 index records: when polling to index record 1, because the index record identifier is not equal to the current index record identifier, directly switching to the next index record; when polling to index record 2, because the index record identification is equal to the current index record identification, extracting the data file name (IX) of index record 2 and setting the current data file name.
Step 5, the electrocardiograph reads the file corresponding to the current data file name on the storage carrier by using the file storage list according to the current data file name to generate a data file reading result and a data file data set;
the method specifically comprises the following steps: step 51, the reading result of the electrocardiograph initialized data file is that reading fails, and the data set of the initialized data file is empty;
step 52, the electrocardiograph polls the file storage records included in the file storage list according to the current data file name; and when the storage file name included in the file storage record is equal to the current data file name, acquiring the physical storage data of the current data file from the storage carrier according to the file physical storage position information included in the file storage record to generate a data file data set, and setting the data file reading result as the reading success.
Here, assuming that the current data file name is IX, the file storage list includes 3 file storage records: file storage record 1 (storage file name is IXC, file physical storage location information is address 1), file storage record 2 (storage file name is IXF, file physical storage location information is address 2), and file storage record 3 (storage file name is IX, file physical storage location information is address 3); when polling is carried out on file storage records included in the file storage list, when the file storage record 1 is polled, the file storage record 2 is switched to because the file name of the storage file is not equal to the file name of the current data; when polling to the file storage record 2, because the storage file name is not equal to the current data file name, switching to the file storage record 3; when polling to the file storage record 3, the current polling is stopped because the storage file name is equal to the current data file name, and all the storage data of the data file are acquired from the storage space pointed by the address 3 of the file storage record 3 to generate a data file data set.
And 6, when the reading result of the data file is successful and the data set of the data file is not empty, setting the search result of the data file as successful search by the electrocardiograph.
Here, in order to prevent a storage medium reading error caused by a component failure of a storage carrier from occurring when the content of a data file is acquired, a data file reading result and a data file data set are subjected to double acceptance, that is, it is considered that the data file searching process is completely successful only when both of the data file reading result and the data file data set are in a normal state (the data file reading result is successful, and the data file data set is not empty). After the data file search process is completely successful, the electrocardiogram will perform the next operations on the data file related to display and modification.
When an electrocardiograph starts a file traversal and search processing flow, firstly, an index file is positioned in a first step, and in practical application, when index file positioning may cause a situation of index file search failure, the electrocardiograph is required to provide a processing flow for reconstructing the index file, as shown in fig. 2, which is a schematic diagram of an index file error processing method provided by a second embodiment of the present invention, the method mainly includes the following steps:
step 101, the electrocardiograph uses a file storage list stored on a storage carrier of the electrocardiograph to read files corresponding to the index file names on the storage carrier according to default index file names, and generates index file reading results and index file data sets;
wherein the index file data set comprises a record counter and a plurality of index records; the index record comprises an index record identifier, a data file name, a file type, a file creation date, a file creation time, a patient identifier, a patient name, a patient sex, a patient age and a patient analysis result;
the file storage list comprises a plurality of file storage records; the file storage record at least comprises a storage file name and file physical storage position information;
the method specifically comprises the following steps: step 1011, the electrocardiograph initializes the index file and reads the result as reading failure, initializes the index file data set as empty;
step 1012, the electrocardiograph polls the file storage records included in the file storage list according to the default index file name; and when the storage file name included in the file storage record is equal to the index file name, acquiring the physical storage data of the index file from the storage carrier according to the file physical storage position information included in the file storage record to generate an index file data set, and setting the index file reading result as the successful reading.
The default file name is set for the habitual operation of the index file, so that the electrocardiograph does not need to perform secondary screening acquisition processing on the name when performing the operation of the index file, operation steps can be saved, and the file access efficiency can be improved; assuming that the default index file name is IXF, assume that the file storage list includes 3 file storage records: file storage record 1 (storage file name IXC, file physical storage location information address 1), file storage record 2 (storage file name IXA, file physical storage location information address 2), and file storage record 3 (storage file name IX, file physical storage location information address 3); when polling is carried out on the file storage records included in the file storage list, when the file storage record 1 is polled, the file storage record 2 is switched to because the storage file name is not equal to the index file name; when polling to the file storage record 2, because the storage file name is not equal to the index file name, then switching to the file storage record 3; when polling to the file storage record 3, because the storage file name is not equal to the index file name, and because there are no more index records, ending the file storage list; after the polling is finished, since no file storage record matching the index file name is found all the time, the index file reading result should be kept in an initial value state: the read fails and the index file data set is also empty.
And 102, when the reading result of the index file is reading failure, the electrocardiograph creates the index file according to the index file name and initializes the recording counter of the index file to be 0.
Here, because the index file does not exist, the electrocardiograph reconstructs the index file, and the first step of reconstruction is to create an empty index file to prepare for content addition of subsequent index files.
103, reconstructing the index file by using the file storage list by the electrocardiograph;
the method specifically comprises the following steps: traversing all file storage records included in the file storage list by the electrocardiograph; and when the current file type is a data file type, extracting the file type, the file creation date, the file creation time, the patient identification, the patient name, the patient sex, the patient age and the patient analysis result of the file to form an index record and adding the index record to the index file.
Before each index record adding operation, a unique index record identifier needs to be automatically allocated to be attached to the index record; after each index record add operation, the record counter of the index file needs to be incremented by 1 to match the actual total number of index records.
The electrocardiograph uses a file storage list as a file large linked list, uses the linked list to check the file type of each file stored on a storage carrier of the electrocardiograph, extracts related data from the data file to assemble into an index record according to the data comparison relation between the data file and the index record if the file is a data file (or a file which needs to be managed by using the index file), and then uses the record to add the index file; after all the files are traversed, the index file is rebuilt.
As shown in fig. 3, which is a schematic view of an apparatus structure of a data file searching apparatus according to a third embodiment of the present invention, the apparatus includes: a processor and a memory. The memory may be connected to the processor by a bus. The memory may be a non-volatile memory such as a hard disk drive and a flash memory, in which a software program and a device driver are stored. The software program is capable of performing various functions of the above-described methods provided by embodiments of the present invention; the device drivers may be network and interface drivers. The processor is used for executing a software program, and the software program can realize the method provided by the embodiment of the invention when being executed.
It should be noted that the embodiment of the present invention also provides a computer-readable storage medium. The computer readable storage medium has a computer program stored thereon, and the computer program can realize the method provided by the embodiment of the invention when being executed by a processor.
The embodiment of the invention also provides a computer program product containing the instruction. The computer program product causes a processor to perform the above-mentioned method when run on a computer.
According to the data file searching method and device provided by the embodiment of the invention, during full-text traversal, the conventional linear linked list traversal mode is replaced by the index file data set reading mode of a single index file by the electrocardiograph, so that the traversal time is shortened; when a single file is searched, the electrocardiograph replaces the traditional linear linked list positioning mode by combining the index file with the file storage list, so that the positioning efficiency is improved. By using the method and the device provided by the invention, the electrocardiograph can easily complete the list display, the file selection and the file searching operation of the locally stored files, effectively shorten the processing period of the business process about the file searching, save the use resources of the equipment memory and improve the use experience of users.
Those of skill would further appreciate that the various illustrative components 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 components and steps have been described above generally in terms of their functionality in order to clearly illustrate this 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 implementation. 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, a software module executed by a processor, or a combination of the two. A software module may reside 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 above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (11)

1. A method for searching a data file, the method comprising:
the electrocardiograph uses a file storage list stored on a storage carrier of the electrocardiograph according to a default index file name to perform file reading operation on a file corresponding to the index file name on the storage carrier, and an index file reading result and an index file data set are generated; the index file data set comprises a record counter and a plurality of index records; the index record at least comprises an index record identifier and a data file name;
when the reading result of the index file is successful, the electrocardiograph counts the total number of the index records included in the index file data set to generate an index record total number, and performs index record total number verification operation on the index record total number by using the record counter to generate an index record total number verification result;
when the total index record number verification result is successful verification, the electrocardiograph performs data file selection operation according to the index file data set to generate a current index record identifier;
the electrocardiograph extracts the data file name of the index record corresponding to the current index record identifier from the index file data set according to the current index record identifier to generate a current data file name;
the electrocardiograph uses the file storage list to read files corresponding to the current data file name on the storage carrier according to the current data file name, and generates a data file reading result and a data file data set;
and when the data file reading result is that the reading is successful and the data file data set is not empty, setting the data file searching result as the successful searching by the electrocardiograph.
2. The data file searching method according to claim 1,
the index record further comprises a file type, a file creation date, a file creation time, a patient identification, a patient name, a patient gender, a patient age, and a patient analysis result;
the file storage list comprises a plurality of file storage records; the file storage record at least comprises a storage file name and file physical storage position information.
3. The method according to claim 2, wherein the electrocardiograph performs a file reading operation on a file corresponding to the index file name on a storage carrier of the electrocardiograph by using a file storage list stored on the storage carrier according to a default index file name, and generates an index file reading result and an index file data set, specifically comprising:
the electrocardiograph initializes the reading result of the index file as reading failure and initializes the data set of the index file as null;
the electrocardiograph polls the file storage records included in the file storage list according to the index file name; and when the storage file name included in the file storage record is equal to the index file name, acquiring physical storage data of an index file from the storage carrier according to the file physical storage location information included in the file storage record to generate an index file data set, and setting the index file reading result as the successful reading.
4. The method for searching for a data file according to claim 1, wherein the performing, by using the record counter, an index record total number check operation on the index record total number to generate an index record total number check result specifically includes:
and the electrocardiograph judges whether the recording counter is equal to the total number of the index records or not, sets the total number of the index records as a verification result as successful verification when the recording counter is equal to the total number of the index records, and sets the total number of the index records as failed verification when the recording counter is not equal to the total number of the index records.
5. The method according to claim 1, wherein when the total number of index records is successfully verified, the electrocardiograph performs data file selection operation according to the index file data set to generate a current index record identifier, specifically including:
when the total index record number verification result is that the verification is successful, the electrocardiograph uses the index file data set to generate a file list, and performs file list display operation on a user according to the file list; the electrocardiograph also provides a file record selection function for the user; the file list comprises a plurality of file records; the file records of the file list and the index records of the index file data set are in one-to-one correspondence;
the electrocardiograph generates a current file record according to a file record selection result of the user on the file list; and extracting the index record identifier of the index record corresponding to the current file record from the index file data set to generate the current index record identifier.
6. The method according to claim 1, wherein the electrocardiograph extracts the data file name of the index record corresponding to the current index record identifier from the index file data set according to the current index record identifier, and generates a current data file name, specifically including:
the electrocardiograph initializes the name of the current data file to be null;
the electrocardiograph polls the index records included in the index file data set according to the current index record identification; and when the index record identifier included in the index record is equal to the current index record identifier, extracting the data file name included in the index record to generate the current data file name.
7. The method according to claim 1, wherein the electrocardiograph performs a file reading operation on a file corresponding to the current data filename on the storage carrier by using the file storage list according to the current data filename, and generates a data file reading result and a data file data set, specifically comprising:
the electrocardiograph initializes the reading result of the data file as reading failure and initializes the data set of the data file as null;
the electrocardiograph polls the file storage records included in the file storage list according to the current data file name; and when the storage file name included in the file storage record is equal to the current data file name, acquiring physical storage data of the current data file from the storage carrier according to the file physical storage location information included in the file storage record to generate the data file data set, and setting the data file reading result as the successful reading.
8. The method of claim 3, further comprising:
and when the reading result of the index file is that the reading fails, the electrocardiograph uses the file storage list to reconstruct the index file.
9. An apparatus, comprising a memory for storing a program and a processor for performing the method of any one of claims 1 to 8.
10. A computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1 to 8.
11. A computer-readable storage medium comprising instructions that, when executed on a computer, cause the computer to perform the method of any of claims 1 to 8.
CN202010206363.6A 2020-03-20 2020-03-20 Data file searching method and device Active CN111414335B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010206363.6A CN111414335B (en) 2020-03-20 2020-03-20 Data file searching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010206363.6A CN111414335B (en) 2020-03-20 2020-03-20 Data file searching method and device

Publications (2)

Publication Number Publication Date
CN111414335A true CN111414335A (en) 2020-07-14
CN111414335B CN111414335B (en) 2023-07-14

Family

ID=71491343

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010206363.6A Active CN111414335B (en) 2020-03-20 2020-03-20 Data file searching method and device

Country Status (1)

Country Link
CN (1) CN111414335B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1851701A (en) * 2005-11-29 2006-10-25 华为技术有限公司 Binary data access method
US20060287990A1 (en) * 2005-06-20 2006-12-21 Lg Electronics Inc. Method of file accessing and database management in multimedia device
CN101052951A (en) * 2005-08-22 2007-10-10 索尼株式会社 Recording apparatus, recording method, program, and computer readable recording medium
CN101620617A (en) * 2009-07-28 2010-01-06 中兴通讯股份有限公司 Method and device for searching and processing log file
JP2011221571A (en) * 2010-04-02 2011-11-04 Nec Corp File management system, file management method and file management program
CN102360361A (en) * 2011-09-29 2012-02-22 深圳芯邦科技股份有限公司 File searching method and related device applied in embedded equipment
CN102419770A (en) * 2011-11-23 2012-04-18 中兴通讯股份有限公司 File sharing system, method for realizing file sharing, and file index service equipment
CN102567348A (en) * 2010-12-17 2012-07-11 上海杉达学院 File indexing method
CN102646130A (en) * 2012-03-12 2012-08-22 华中科技大学 Method for storing and indexing mass historical data
CN105512246A (en) * 2015-11-30 2016-04-20 上海联影医疗科技有限公司 DICOM file access method and device
CN105701096A (en) * 2014-11-25 2016-06-22 腾讯科技(深圳)有限公司 Index generation method, data inquiry method, index generation device, data inquiry device and system
CN106326397A (en) * 2016-08-19 2017-01-11 东软集团股份有限公司 Method and device for generating index file
CN110287201A (en) * 2019-07-02 2019-09-27 重庆紫光华山智安科技有限公司 Data access method, device, equipment and storage medium

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060287990A1 (en) * 2005-06-20 2006-12-21 Lg Electronics Inc. Method of file accessing and database management in multimedia device
CN101052951A (en) * 2005-08-22 2007-10-10 索尼株式会社 Recording apparatus, recording method, program, and computer readable recording medium
CN1851701A (en) * 2005-11-29 2006-10-25 华为技术有限公司 Binary data access method
CN101620617A (en) * 2009-07-28 2010-01-06 中兴通讯股份有限公司 Method and device for searching and processing log file
JP2011221571A (en) * 2010-04-02 2011-11-04 Nec Corp File management system, file management method and file management program
CN102567348A (en) * 2010-12-17 2012-07-11 上海杉达学院 File indexing method
CN102360361A (en) * 2011-09-29 2012-02-22 深圳芯邦科技股份有限公司 File searching method and related device applied in embedded equipment
CN102419770A (en) * 2011-11-23 2012-04-18 中兴通讯股份有限公司 File sharing system, method for realizing file sharing, and file index service equipment
CN102646130A (en) * 2012-03-12 2012-08-22 华中科技大学 Method for storing and indexing mass historical data
CN105701096A (en) * 2014-11-25 2016-06-22 腾讯科技(深圳)有限公司 Index generation method, data inquiry method, index generation device, data inquiry device and system
CN105512246A (en) * 2015-11-30 2016-04-20 上海联影医疗科技有限公司 DICOM file access method and device
CN106326397A (en) * 2016-08-19 2017-01-11 东软集团股份有限公司 Method and device for generating index file
CN110287201A (en) * 2019-07-02 2019-09-27 重庆紫光华山智安科技有限公司 Data access method, device, equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
JIANGONG ZHANG.ET AL: "Performance of compressed inverted list caching in search engines", WWW \'08: PROCEEDINGS OF THE 17TH INTERNATIONAL CONFERENCE ON WORLD WIDE WEB, pages 387 *
程晗等: "基于Redis的海量智慧医疗小文件存储架构设计", 计算机应用与软件, pages 86 - 90 *

Also Published As

Publication number Publication date
CN111414335B (en) 2023-07-14

Similar Documents

Publication Publication Date Title
CN109062780B (en) Development method of automatic test case and terminal equipment
US8078811B2 (en) Method for digital storage of data on a data memory with limited available storage space
CN109471851B (en) Data processing method, device, server and storage medium
JP2004305289A (en) Medical system
CN111782635B (en) Data processing method and device, storage medium and electronic device
CN113948168A (en) Medical data evaluation practical application system and medical data evaluation practical application method
CN111400258B (en) Data file storage method and device
US8782626B2 (en) Search suggestions for static code analysis
CN111414335B (en) Data file searching method and device
CN114360671A (en) Electronic medical record generation method and device, storage medium and electronic device
CN114168544B (en) Clinical trial data processing method, device, computer equipment and storage medium
CN111382004A (en) Parameter backup method and device, restoration method and device and backup restoration system
KR101938376B1 (en) Systems and method for managing web-based clinical trial medical imaging and program therefor
CN114242255A (en) Medical data processing method and device, storage medium and electronic equipment
CN109871214B (en) Program code generation method, program code generation device, computer device, and storage medium
CN113724808A (en) Medical survey questionnaire generation method and device, electronic equipment and storage medium
JP2012003465A (en) Schema drawing device, schema drawing system and schema drawing program
CN112363850A (en) DCWI interface-free system for rapidly acquiring document
CN111429987B (en) Index file-based searching method and device
CN113986343B (en) Program module acquisition method, program module acquisition device, computer equipment and storage medium
CN111708711B (en) AB test method and device, storage medium and electronic equipment
CN110765022B (en) Method, device, computer equipment and storage medium for automatically testing sample sending SSD
CN114168665A (en) Clinical trial data mapping method, device, computer equipment and storage medium
KR102222147B1 (en) Method for assigning medical images for interpretation
Lees et al. Standards and interoperability in digital electrocardiography. The OpenECG project

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