CN111414335B - Data file searching method and device - Google Patents

Data file searching method and device Download PDF

Info

Publication number
CN111414335B
CN111414335B CN202010206363.6A CN202010206363A CN111414335B CN 111414335 B CN111414335 B CN 111414335B CN 202010206363 A CN202010206363 A CN 202010206363A CN 111414335 B CN111414335 B CN 111414335B
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.)
Active
Application number
CN202010206363.6A
Other languages
Chinese (zh)
Other versions
CN111414335A (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 data file searching method and a data file searching device, 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; checking the total number of index records when the index file is successfully read to generate a check result of the total number of index records; when the total number of index records is successfully checked, selecting data files according to the index file data set to generate a current index record identifier; extracting the data file name of the index record corresponding to the current index record identification from the index file data set to generate a current data file name; file reading is carried out according to the current data file name to generate a data file reading result and a data file data set; and when the data file is successfully read and the data set of the data file is not empty, setting the searching result of the data file as successful searching.

Description

Data file searching method and device
Technical Field
The invention relates to the technical field of electrocardiographic 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 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 searching and acquiring 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 traditional file traversal query method based on the linear chain table can be used for completing the search and data acquisition of the data files, the search process cannot cause overlong time consumption of a device processor, and a user cannot have adverse experience of service pause. However, with the rapid capacity expansion and cost reduction 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 previous file traversing method is still used for searching the data file for the storage mode, the time consumed by the device processor is too long due to too many traversed files, so that bad experiences such as false halt, interface pause and the like are caused for a user.
Disclosure of Invention
The invention aims at overcoming the defects of the prior art, and provides a data file searching method and a data file searching device, wherein in full-text traversal, a traditional linear linked list traversal mode is replaced by an index file data set reading mode of a single index file, so that traversal time is shortened; when searching a single file, the traditional linear linked list positioning mode is replaced by a positioning mode of combining an index file with a file storage list, so that the positioning efficiency is improved; and the full text traversal and the single file searching 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 list display and file searching operations of mass files stored locally, the processing period of the business process about file searching can be effectively shortened, the memory use resources of the equipment are saved, and the use experience of a user is improved.
To achieve the above object, a first aspect of an embodiment of the present invention provides a data file searching method, which is characterized in that 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, performs file reading operation on a file corresponding to the index file name on the storage carrier, and generates an index file reading result and an index file data set; the index file data set comprises a record counter and a plurality of index records; the index record at least comprises an index record identification and a data file name;
when the reading result of the index file is that the reading is successful, the electrocardiograph counts the total number of index records included in the index file data set to generate an index record total number, and uses the record counter to carry out index record total number checking operation on the index record total number to generate an index record total number checking result;
when the checking result of the total number of index records is that the checking is successful, 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, and generates a current data file name;
the electrocardiograph uses the file storage list to carry out file reading operation on a file 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 reading result of the data file is that the reading is successful and the data set of the data file is not empty, setting the searching result of the data file as that the searching is successful by the electrocardiograph.
Preferably, the method comprises the steps of,
the index record further includes 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 includes at least a storage file name and file physical storage location information.
Preferably, the electrocardiograph uses a file storage list stored on a storage carrier of the electrocardiograph according to a default index file name, and performs a file reading operation on a file corresponding to the index file name on the storage carrier to generate an index file reading result and an index file data set, and specifically includes:
initializing the index file data set to be empty by the electrocardiograph, wherein the reading result of the index file is initialized to be failed in reading;
the electrocardiograph polls the file storage records included in the file storage list according to the index file name; 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 physical storage position information of the file included in the file storage record to generate the index file data set, and setting the reading result of the index file as the reading success.
Preferably, the performing an index record total number verification operation on the index record total number by using the record counter, and generating an index record total number verification result specifically includes:
the electrocardiograph judges whether the record counter is equal to the total number of index records, when the record counter is equal to the total number of index records, the total number of index records is set to be checked successfully, and when the record counter is not equal to the total number of index records, the total number of index records is set to be checked failed.
Preferably, when the verification result of the total number of index records is that the verification is successful, the electrocardiograph performs a data file selection operation according to the index file data set to generate a current index record identifier, which specifically includes:
when the checking result of the total number of index records is that the checking is successful, the electrocardiograph uses the index file data set to generate a file list, and performs file list display operation to a user according to the file list; the electrocardiograph also provides a file record selection function to 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;
generating a current file record by the electrocardiograph according to a file record selection result of the user on the file list; and extracting the index record identification of the index record corresponding to the current file record from the index file data set to generate the current index record identification.
Preferably, 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, which specifically includes:
initializing the current data file name by the electrocardiograph to be empty;
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 uses the file storage list according to the current data file name, performs a file reading operation on a file corresponding to the current data file name on the storage carrier, and generates a data file reading result and a data file data set, and specifically includes:
initializing the electrocardiograph, wherein the reading result of the data file is a reading failure, and the data set of the data file is initialized to be empty;
the electrocardiograph polls the file storage records included in the file storage list according to the current data file name; when the stored 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 physical storage position information of the file included in the file storage record to generate the data file data set, and setting the data file reading result as the reading success.
Preferably, the method further comprises: and when the reading result of the index file is that the reading fails, the electrocardiograph rebuilds the index file by using the file storage list.
According to the data file searching method provided by the first aspect of the embodiment of the invention, in full-text traversal, an electrocardiograph replaces a traditional linear linked list traversal mode with an index file data set reading mode for a single index file, so that traversal time is shortened; when searching a single file, the electrocardiograph replaces the traditional linear linked list positioning mode by combining the index file with the file storage list positioning mode, so that the positioning efficiency is improved; and the whole text traversal and the single file searching process are uniformly packaged by providing an interaction interface with a user through an electrocardiograph.
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 searching method according to a first embodiment of the present invention;
FIG. 2 is a schematic diagram of an index file error handling method according to a second embodiment of the present invention;
fig. 3 is a schematic device structure diagram 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 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 by way of examples, several documents of the electrocardiograph mentioned herein are briefly described.
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 electrocardiographic waveform, patient measurement results, patient analysis results, patient heart beat information, patient representative heart beat data, patient lead data, device parameters, and the like.
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 an index record identification, a data file name, a file type, a file creation date, a file creation time, a patient identification, a patient name, a patient gender, a patient age, a patient analysis result 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 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 to the index file to be matched with the index record.
The file storage list is a vector table stored in the electrocardiograph and used for establishing a corresponding relation between storage file names and file physical storage position 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: a storage file name (corresponding to an index file is an index file name, corresponding to a data file is a data file name) and file physical storage location information (actual physical storage address or area information on a storage carrier). Each write operation (create, modify, delete) to a file will make a corresponding modification to the table. The file storage list can be in a custom format of an embedded operating system, and can also adopt common data formats such as a 16-bit file allocation table (16bit File Allocation Table,FAT16), a 32-bit file allocation table FAT32 and the like, and the specific implementation is determined according to engineering implementation requirements.
The electrocardiograph is often used in a specific manner, and provides list browsing of search files for a user through a man-machine interaction interface, and extracts corresponding file specific information according to selection of a certain file on the man-machine interaction interface by the user, as shown in a schematic diagram of a data file search method provided by fig. 1 in the first embodiment of the invention, the method mainly comprises the following steps:
step 1, according to a default index file name, the electrocardiograph uses a file storage list stored on a storage carrier of the electrocardiograph to perform file reading operation on a file corresponding to the index file name on the storage carrier to generate an index file reading result and an index file data set;
electrocardiographs provide users with a variety of human-computer interaction interface modes: an application program interface (Application Program Interface, API) mode, an instruction mode using an instruction console, or a window mode using a display device to present in a visual interface; the file inquiry processing flow started in the step 1 has customized activating means under each interaction mode: activating by a user in an API mode by using a customized file list obtaining interface, activating by inputting a file list obtaining instruction by the user in an instruction mode by using information input equipment such as a keyboard, a mouse and the like of an electrocardiograph, and activating by clicking a file list obtaining instruction provided in the interface by using information input equipment such as the keyboard, the mouse and a touch screen of the electrocardiograph in a window mode; in addition, the three modes are not limited to the electrocardiograph, but also can be devices with API, instruction desk and window capability, such as mobile phones, PAD, computers and the like, which are connected with the electrocardiograph through a network;
the storage carrier is a storage medium which is used for storing all files (including index files, data files, file storage lists and the like) locally for the electrocardiograph, and the specific implementation of the storage carrier can be a separate storage medium on the electrocardiograph or a combined storage body consisting of a plurality of separate storage media;
the index file data set comprises a record counter and a plurality of index records; the index record includes index record identification, data file name, file type, file creation date, file creation time, patient identification, patient name, patient gender, patient age, and 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, the electrocardiograph initializes the index file reading result to be the reading failure, and initializes the index file data set to be empty;
here, initializing the reading result of the index file in advance to be a reading failure, if the subsequent steps cannot be completed normally, on one hand, judging and setting the reading result of the index file is not needed, and on the other hand, the electrocardiograph activates the index file reconstruction processing process according to the reading failure state of the index file;
step 12, the electrocardiograph polls file storage records included in the file storage list according to a default index file name; when the storage file name included in the file storage record is equal to the index file name, acquiring 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 successful reading.
Here, a default file name is set for the habit operation of the index file, so that the electrocardiograph does not need to carry out secondary screening and acquisition processing on the name when carrying out the operation of the index file, and the operation steps can be saved and the file access efficiency can be improved; assuming that the index file name defaults to IXF, the file storage list is assumed to include 3 file storage records: file storage record 1 (storage file name=ixc, file physical storage location information is address 1), file storage record 2 (storage file name= IXF, file physical storage location information is address 2), file storage record 3 (storage file name=ix, file physical storage location information is address 3); when the file storage records included in the file storage list are polled, when the file storage record 1 is polled, the file storage record 2 is transferred because the storage file name is not equal to the index file name; when the file storage record 2 is polled, because the storage file name is equal to the index file name, the current polling is stopped, and all storage data of the index file is acquired from the storage space pointed to 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 searching of all the data files on the storage carrier is completed.
Step 2, when the index file reading result is that the reading is successful, the electrocardiograph counts the total number of index records included in the index file data set to generate an index record total number, and uses a record counter to carry out index record total number checking operation on the index record total number to generate an index record total number checking result;
the method specifically comprises the following steps: when the index file reading result is that the reading is successful, the electrocardiograph counts the total number of index records included in the index file data set to generate the total number of index records; and judging whether the record counter is equal to the total number of index records, setting the total number of index records as verification success when the record counter is equal to the total number of index records, and setting the total number of index records as verification failure when the record counter is not equal to the total number of index records.
Here, the record counter of the index file data set is to be modified after each operation (adding and deleting) is performed on the index record, if unpredictable accidents such as power failure occur during modification, modification failure may be caused, so that the total number of the counter and the actual index record is not matched; therefore, after the data of the index file is obtained, the record number of the index file needs to be checked; the specific calibration principle is to compare whether the actual total index record number is equal to the record counter value, and if the actual index record number is unequal (calibration failure), the conventional process is to stop the file searching process flow and activate the corresponding process flow in the electrocardiograph.
Step 3, when the checking result of the total number of index records 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 uses the index file data set to generate a file list, 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 to 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;
all index records of the index file data set are copied into a file list by the electrocardiograph, and the file list is composed of a plurality of file records, so that a one-to-one correspondence between each file record and the index record in the index file data set is realized;
then, the electrocardiograph performs file list display to the user based on different man-machine interaction modes: under the API mode, providing a file list for an application program through an application program interface; in the instruction mode, presenting a file list to a user through an instruction console; in the window mode, presenting a file list interface to a user through display equipment of an electrocardiograph;
step 32, the electrocardiograph generates a current file record according to the file record selection result of the user on the file list; and extracting the index record identification of the index record corresponding to the current file record from the index file data set to generate a current index record identification.
Here, the electrocardiograph obtains a file record selection result of the user on the file list based on different man-machine interaction modes to generate a current file record: under the API mode, acquiring a file record selection result transmitted to an electrocardiograph by a user through an application program interface to generate a current file record; in the instruction mode, acquiring file record selection results input by a user by using information input equipment such as a keyboard, a mouse and the like of the electrocardiograph to generate a current file record, and in the window mode, acquiring file record selection results clicked by the user by using information input equipment such as the keyboard, the mouse and a touch screen of the electrocardiograph to generate the 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, and generates the current data file name;
the method specifically comprises the following steps: step 41, initializing the current data file name by the electrocardiograph to be empty;
step 42, the electrocardiograph polls the index records included in the index file data set according to the current index record identification; when the index record identification included in the index record is equal to the current index record identification, the data file name included in the index record is extracted 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: index record 1 (index record identification=1, data file name=ixc), index record 2 (index record identification=2, data file name=ix), polling the index records included in the index file data set according to the current index record identification, and when index record 1 is polled, directly switching to the next index record because the index record identification is not equal to the current index record identification; when index record 2 is polled, the data file name (IX) of index record 2 is extracted and the current data file name is set because the index record identification is equal to the current index record identification.
Step 5, the electrocardiograph uses a file storage list to carry out file reading operation on a file corresponding to the current data file name on a storage carrier according to the current data file name, and generates 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 initializing data file of the electrocardiograph is that the reading fails, and the data set of the initializing 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; when the stored 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 physical storage position information of the file included in the file storage record to generate a data file data set, and setting the data file reading result as successful reading.
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=ixc, file physical storage location information is address 1), file storage record 2 (storage file name= IXF, file physical storage location information is address 2), file storage record 3 (storage file name=ix, file physical storage location information is address 3); when the file storage records included in the file storage list are polled, when the file storage record 1 is polled, the file storage record 2 is transferred because the stored file name is not equal to the current data file name; when the file storage record 2 is polled, the file storage record 3 is transferred to because the storage file name is not equal to the current data file name; when the file storage record 3 is polled, because the storage file name is equal to the current data file name, the current polling is stopped, and all storage data of the data file is acquired from the storage space pointed to by the address 3 of the file storage record 3 to generate a data file data set.
And 6, setting the searching result of the data file as successful searching by the electrocardiograph when the reading result of the data file is successful and the data set of the data file is not empty.
Here, in order to prevent a storage medium read error due to a component failure of the storage carrier from occurring when the content of the data file is acquired, double acceptance of the data file read result and the data file data set is required, that is, the current data file search process must be completely successful in the case where both are in a normal state (the data file read result is successful and the data file data set is not empty). After the data file finding process is completely successful, the electrocardiograph will perform the next operation on the data file related to the display and modification.
When the electrocardiograph starts the file traversing and searching process flow, firstly, the first step is to locate the index file, in practical application, the index file locating may have the index file searching failure, at this time, the electrocardiograph is required to provide a process flow for reconstructing the index file, as shown in fig. 2, which is a schematic diagram of an index file error processing method provided in the second embodiment of the present invention, the method mainly includes the following steps:
step 101, according to a default index file name, using a file storage list stored on a storage carrier of the electrocardiograph, performing file reading operation on a file corresponding to the index file name on the storage carrier to generate an index file reading result and an index file data set;
the index file data set comprises a record counter and a plurality of index records; the index record includes index record identification, data file name, file type, file creation date, file creation time, patient identification, patient name, patient gender, patient age, and 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, initializing an electrocardiograph, wherein the reading result of the index file is that the reading fails, and the data set of the index file is empty;
step 1012, the electrocardiograph polls the file storage records included in the file storage list according to the default index file name; when the storage file name included in the file storage record is equal to the index file name, acquiring 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 successful reading.
Here, a default file name is set for the habit operation of the index file, so that the electrocardiograph does not need to carry out secondary screening and acquisition processing on the name when carrying out the operation of the index file, and the 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 is address 1), file storage record 2 (storage file name=ixa, file physical storage location information is address 2), file storage record 3 (storage file name=ix, file physical storage location information is address 3); when the file storage records included in the file storage list are polled, when the file storage record 1 is polled, the file storage record 2 is transferred because the storage file name is not equal to the index file name; when the file storage record 2 is polled, the file storage record 3 is transferred to because the storage file name is not equal to the index file name; when the file storage record 3 is polled, ending the file storage list because the storage file name is not equal to the index file name and because there are no more index records; after the polling is ended, since the file storage record whose index file name matches is not found all the time, the index file read result should be kept in an initial value state: the read fails and the index file data set is also empty.
Step 102, when the reading result of the index file is that the reading fails, the electrocardiograph creates the index file according to the index file name and initializes the record counter of the index file to 0.
Because the index file does not exist, the electrocardiograph needs to reconstruct the index file, and the first step of reconstruction is to create an empty index file to prepare for adding the content of the subsequent index file.
Step 103, reconstructing the index file by using a 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 acquiring the file type of the corresponding file from a storage position pointed by the file physical storage position information of the file storage record to generate a current file type, extracting the file type, the file creation date, the file creation time, the patient identification, the patient name, the patient gender, the patient age and the patient analysis result of the file to form an index record when the current file type is the data file type, and performing index record adding operation on the index file.
And, before each index record adding operation, a unique index record identification needs to be automatically allocated and added to the index record; after each index record adding operation, the record counter of the index file needs to be added by 1 to match the actual total number of index records.
The electrocardiograph uses the file storage list as a file large chain table, uses the chain table to check the file type of each file stored on the storage carrier of the electrocardiograph, and if the file is a data file (or a file needing to be managed by an index file), extracts related data from the data file according to the data comparison relation between the data file and the index record to assemble the index record, and then uses the record to add the index file; after traversing all files, the index file is also reconstructed.
Fig. 3 is a schematic diagram of an apparatus structure of a data file searching 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 searching method and device provided by the embodiment of the invention, in full-text traversal, an electrocardiograph replaces a traditional linear linked list traversal mode with an index file data set reading mode of a single index file, so that traversal time is shortened; when searching a single file, 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 list display, file selection and file searching operations on the locally stored files, effectively shorten the processing period of the business process about 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 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 (6)

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, performs file reading operation on a file corresponding to the index file name on the storage carrier, and generates an index file reading result and an index file data set; the index file data set comprises a record counter and a plurality of index records; the index record at least comprises an index record identification and a data file name;
when the reading result of the index file is that the reading is successful, the electrocardiograph counts the total number of index records included in the index file data set to generate an index record total number, and uses the record counter to carry out index record total number checking operation on the index record total number to generate an index record total number checking result;
when the checking result of the total number of index records is that the checking is successful, 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, and generates a current data file name;
the electrocardiograph uses the file storage list to carry out file reading operation on a file 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;
when the reading result of the data file is that the reading is successful and the data set of the data file is not empty, the electrocardiograph sets the searching result of the data file as that the searching is successful;
wherein 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;
the electrocardiograph uses a file storage list stored on a storage carrier of the electrocardiograph according to a default index file name, performs file reading operation on a file corresponding to the index file name on the storage carrier, and generates an index file reading result and an index file data set, and specifically comprises the following steps:
initializing the index file data set to be empty by the electrocardiograph, wherein the reading result of the index file is initialized to be failed in reading;
the electrocardiograph polls the file storage records included in the file storage list according to the index file name; 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 physical storage position information of the file included in the file storage record to generate the index file data set, and setting the reading result of the index file as the reading success;
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, which specifically comprises the following steps:
when the reading result of the index file is that the reading fails, the electrocardiograph creates the index file according to the index file name and initializes the record counter of the index file to 0;
traversing all the file storage records included in the file storage list; acquiring a file type of a corresponding file from a storage position pointed by the file physical storage position information of the file storage record to generate a current file type, extracting the file type, the file creation date, the file creation time, the patient identification, the patient name, the patient gender, the patient age and the patient analysis result of the file to form an index record when the current file type is a data file type, and performing index record adding operation on the index file; and automatically assigning a unique said index record identification to be appended to said index record prior to each index record addition operation, and incrementing said record counter of said index file by 1 after each index record addition operation.
2. The method for searching for data files according to claim 1, wherein the performing an index record total check operation on the index record total by using the record counter, and generating an index record total check result specifically includes:
the electrocardiograph judges whether the record counter is equal to the total number of index records, when the record counter is equal to the total number of index records, the total number of index records is set to be checked successfully, and when the record counter is not equal to the total number of index records, the total number of index records is set to be checked failed.
3. The method for searching data files according to claim 1, wherein when the total number of index records is verified, the electrocardiograph performs a data file selection operation according to the index file data set to generate a current index record identifier, and the method specifically includes:
when the checking result of the total number of index records is that the checking is successful, the electrocardiograph uses the index file data set to generate a file list, and performs file list display operation to a user according to the file list; the electrocardiograph also provides a file record selection function to 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;
generating a current file record by the electrocardiograph according to a file record selection result of the user on the file list; and extracting the index record identification of the index record corresponding to the current file record from the index file data set to generate the current index record identification.
4. 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 comprising:
initializing the current data file name by the electrocardiograph to be empty;
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.
5. 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 4.
6. 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 4.
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 CN111414335A (en) 2020-07-14
CN111414335B true 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 (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102360361A (en) * 2011-09-29 2012-02-22 深圳芯邦科技股份有限公司 File searching method and related device applied in embedded 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

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060133410A (en) * 2005-06-20 2006-12-26 엘지전자 주식회사 Method for managing file database and searching file in multimedia device
WO2007023784A1 (en) * 2005-08-22 2007-03-01 Sony Corporation Recording apparatus, recording method, program, and computer readable recording medium
CN100357952C (en) * 2005-11-29 2007-12-26 华为技术有限公司 Binary data access method
CN101620617B (en) * 2009-07-28 2011-07-13 中兴通讯股份有限公司 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
CN102419770B (en) * 2011-11-23 2014-12-31 中兴通讯股份有限公司 File sharing system, method for realizing file sharing, and file index service equipment
CN105701096A (en) * 2014-11-25 2016-06-22 腾讯科技(深圳)有限公司 Index generation method, data inquiry method, index generation device, data inquiry device and system
CN105512246B (en) * 2015-11-30 2019-04-12 上海联影医疗科技有限公司 The access method and its device of DICOM file
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 (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN102646130A (en) * 2012-03-12 2012-08-22 华中科技大学 Method for storing and indexing mass historical data

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.2008,第387–396页. *
基于Redis的海量智慧医疗小文件存储架构设计;程晗等;计算机应用与软件;第86-90,128页 *

Also Published As

Publication number Publication date
CN111414335A (en) 2020-07-14

Similar Documents

Publication Publication Date Title
CN109062780B (en) Development method of automatic test case and terminal equipment
CN109524070B (en) Data processing method and device, electronic equipment and storage medium
CN109471851B (en) Data processing method, device, server and storage medium
JP4965210B2 (en) A computer-implemented method for acquiring and transmitting file system dense diagnostic data
CN108459962A (en) Code specification detection method, device, terminal device and storage medium
CN102541731B (en) Platform-agnostic diagnostic data collection and display
CN108628885B (en) Data synchronization method and device and storage equipment
US7966390B2 (en) Terminal emulation program, storage medium, load test method, load test apparatus, and load test system
CN105512276B (en) Method and device for constructing junk file and electronic equipment
CN112433712A (en) Report display method and device, computer equipment and storage medium
CN106294128B (en) A kind of automated testing method and device exporting report data
CN114924914B (en) Disk partition table information backup and recovery method and system
CN110889013A (en) Data association method, device, server and storage medium based on XML
CN114168544B (en) Clinical trial data processing method, device, computer equipment and storage medium
CN112711398A (en) Method, device and equipment for generating buried point file and storage medium
CN112416710A (en) User operation recording method and device, electronic equipment and storage medium
CN113010208B (en) Version information generation method, device, equipment and storage medium
CN111400258B (en) Data file storage method and device
CN111414335B (en) Data file searching method and device
CN114968347A (en) Stack restoring method and device, storage medium and electronic equipment
CN115545008B (en) Spectrogram file analyzing method, device, equipment and storage medium
CN110737577B (en) Test defect data storage method and device
CN115408358A (en) Network disk online file management method and device, network disk and storage medium
CN114281845A (en) Index generation method and device, electronic equipment and readable storage medium
CN110888874B (en) Device and method for creating form through Excel 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