CN111429987A - Searching method and device based on index file - Google Patents

Searching method and device based on index file Download PDF

Info

Publication number
CN111429987A
CN111429987A CN202010205056.6A CN202010205056A CN111429987A CN 111429987 A CN111429987 A CN 111429987A CN 202010205056 A CN202010205056 A CN 202010205056A CN 111429987 A CN111429987 A CN 111429987A
Authority
CN
China
Prior art keywords
file
index
electrocardiograph
keyword
search
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
CN202010205056.6A
Other languages
Chinese (zh)
Other versions
CN111429987B (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 CN202010205056.6A priority Critical patent/CN111429987B/en
Publication of CN111429987A publication Critical patent/CN111429987A/en
Application granted granted Critical
Publication of CN111429987B publication Critical patent/CN111429987B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H10/00ICT specially adapted for the handling or processing of patient-related medical or healthcare data
    • G16H10/60ICT specially adapted for the handling or processing of patient-related medical or healthcare data for patient-specific data, e.g. for electronic patient records
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/318Heart-related electrical modalities, e.g. electrocardiography [ECG]
    • A61B5/333Recording apparatus specially adapted therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/148File search processing
    • 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

Abstract

The embodiment of the invention relates to a searching method and a device based on an index file, wherein the method comprises the following steps: receiving a selection of a search mode by a user to generate a search mode identifier; according to the preset index file name, file searching operation is executed in a local storage carrier to generate a file handle identifier; when the file handle identifier is not empty, setting the file corresponding to the file handle identifier as an index file; performing corresponding index record data searching operation on the index file according to the search mode identifier, performing full record searching operation on the index file according to the record counter to generate a file list when the search mode identifier is a full-text search mode, and performing keyword searching operation on the index file according to the record counter and a search keyword and a keyword type input by a user to generate a file list when the search mode identifier is a keyword search mode; and when the file list is not empty, sending the file list to the user as a search result.

Description

Searching method and device based on index file
Technical Field
The invention relates to the technical field of electrocardio data processing, in particular to a searching method and a searching device based on an index file.
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, searching and obtaining based on an index file can be completed by directly utilizing a high-efficiency engine of a remote professional database in an online mode, and therefore 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 search of the data files only by establishing one linear linked list, and because the number of the files is small and the linear linked list is short, the search process cannot cause the long time consumption of the device processor and the poor feeling of service pause of a user. However, with the rapid expansion of the storage carrier in the market, when the conventional electrocardiograph also has mass data storage capability (at least thousands of parts or even tens of thousands of parts can be stored), if the conventional linear linked list query method is still used on the device, the time consumption of the device processor is too long during file search due to too many files and too large linked lists, which causes bad experiences such as false dead halt, interface pause, and the like for the user.
In order to solve the problem, an index file is added to correspond to each data file on the basis of an original data file management (linear linked list) mode, each index record of the index file corresponds to one data file, and a time-consuming full-file traversal mode of the linear linked list is changed into a simple index file reading mode when a user searches files. And because the index files are all established according to the standard data format, the method can also provide targeted search based on keywords to the outside.
Disclosure of Invention
The invention aims to provide a searching method and a searching device based on an index file, which aim to overcome the defects of the prior art, and execute different searching processing flows through the identification of a searching mode identifier: when the search mode identifier is a full text search mode, performing full record search on the content of the index file and outputting a file list; and when the search mode identifier is a keyword mode, performing keyword search on the content of the index file according to the input search keyword and the keyword type and outputting a file list. By using the method and the device, the efficiency of browsing the local files in full text by the electrocardiograph can be improved, and the function of directionally searching the local files is additionally added to the electrocardiograph, so that the problem of file access efficiency after a large-capacity storage carrier is loaded in the conventional electrocardiograph is solved, the utilization rate of large-capacity data can be improved by means of the newly added directional searching function, and the problem of data file inactivation caused by huge data volume and laggard searching function is avoided.
In order to achieve the above object, a first aspect of the embodiments of the present invention provides an index file-based search method, where the method includes:
Receiving a selection of a search mode by a user by the electrocardiograph to generate a search mode identifier; the search pattern identifier includes a full text search pattern and a keyword search pattern;
The electrocardiograph executes file searching operation in a local storage carrier according to a preset index file name to generate a file handle identifier;
When the file handle identifier is not empty, the electrocardiograph sets the file corresponding to the file handle identifier as an index file; the index file comprises a record counter and a plurality of index record data;
The electrocardiograph searches index record data corresponding to the index file according to the search mode identifier; when the search mode identifier is the full text search mode, the electrocardiograph performs full record search operation on the index file according to the record counter to generate a file list; when the search mode identifier is the keyword search mode, the electrocardiograph generates a keyword type and a search keyword according to a keyword type selection operation result and a search keyword input operation result of the user, and performs keyword search operation on the index file according to the record counter, the search keyword and the keyword type to generate the file list;
And when the file list is not empty, the electrocardiograph sends the file list to the user as a search result.
Preferably, the first and second liquid crystal materials are,
The index record data at least comprises a data file name field, a file category field, a file creation date field, a file creation time field, a patient identification field, a patient name field, a patient gender field and a patient age field;
The keyword types include at least a data file name type, a file category type, a file creation date type, a file creation time type, a patient identification type, a patient name type, a patient gender type, and a patient age type.
Preferably, the electrocardiograph executes a file lookup operation in a local storage carrier according to a preset index file name to generate a file handle identifier, and specifically includes:
The electrocardiograph carries out file retrieval operation on all files stored in the storage carrier according to the index file names; if the file matched with the index file name is retrieved, a unique identifier is allocated to the file to generate the file handle identifier; setting the file handle identifier to null if no file matching the index file name is retrieved.
Preferably, when the search mode identifier is the full-text search mode, the electrocardiograph performs full-record search operation on the index file according to the record counter to generate a file list, which specifically includes:
Step 41, when the search mode identifier is the full text search mode, initializing a value of a first index to be 1, initializing a first total number to be the recording counter, and initializing a first temporary file list to be null by the electrocardiograph;
Step 42, the electrocardiograph extracts the index record data corresponding to the first index from the index file and adds the index record data to the first temporary file list;
Step 43, the electrocardiograph adds 1 to the first index;
Step 44, the electrocardiograph determines whether the first index is greater than the first total number, and goes to step 45 if the first index is greater than the first total number, and goes to step 42 if the first index is less than or equal to the first total number;
And step 45, setting the file list as the first temporary file list by the electrocardiograph.
Preferably, when the search mode identifier is the keyword search mode, the electrocardiograph generates a keyword type and a search keyword according to a keyword type selection operation result and a search keyword input operation result of the user, and performs a keyword search operation on the index file according to the record counter, the search keyword, and the keyword type to generate the file list, specifically including:
Step 51, when the search mode identifier is the keyword search mode, the electrocardiograph obtains a keyword type selection operation result of the user to generate the keyword type, and obtains a search keyword input operation result of the user to generate the search keyword;
Step 52, initializing a value of a second index of 1, initializing a second total number of the recording counters, and initializing a second temporary file list to be null by the electrocardiograph;
Step 53, the electrocardiograph extracts the index record data corresponding to the second index from the index file to generate second index record data;
Step 54, the electrocardiograph extracts a field corresponding to the keyword type from the second index record data to generate a second index field;
Step 55, the electrocardiograph determines whether the second index field is equal to the search key, and if the second index field is equal to the search key, the step 56 is performed, and if the second index field is not equal to the search key, the step 57 is performed;
Step 56, the electrocardiograph adds the index record data to the second temporary file list according to the second index record data;
Step 57, the electrocardiograph adds 1 to the second index;
Step 58, the electrocardiograph determines whether the second index is greater than the second total number, and goes to step 59 if the second index is greater than the second total number, and goes to step 53 if the second index is less than or equal to the second total number;
Step 59, the electrocardiograph sets the file list as the second temporary file list.
Further, the electrocardiograph extracts a field corresponding to the keyword type from the second index record data to generate a second index field, and specifically includes:
When the keyword type is the data file name type, the electrocardiograph extracts the data file name field from the second index record data to generate a second index field;
When the keyword type is the file type, the electrocardiograph extracts the file type field from the second index record data to generate a second index field;
When the keyword type is the file creation date type, the electrocardiograph extracts the file creation date field from the second index record data to generate a second index field;
When the keyword type is the file creation time type, the electrocardiograph extracts the file creation time field from the second index record data to generate a second index field;
When the keyword type is the patient identification type, the electrocardiograph extracts the patient identification field from the second index record data to generate a second index field;
When the keyword type is the patient name type, the electrocardiograph extracts the patient name field from the second index record data to generate a second index field;
When the keyword type is the patient gender type, the electrocardiograph extracts the patient gender field from the second index record data to generate a second index field;
When the keyword type is the patient age type, the electrocardiograph extracts the patient age field from the second index record data to generate the second index field.
In a search method based on an index file according to a first aspect of the embodiments of the present invention, different search processing flows are executed by identifying a search pattern identifier: when the search mode identifier is a full text search mode, performing full record search on the content of the index file and outputting a file list; and when the search mode identifier is in a single keyword mode, performing keyword search on the content of the index file according to the input search keyword and the keyword type and outputting a file list. By using the method and the device of the invention, the efficiency of browsing the local file in full text by the electrocardiograph can be improved, and the function of directionally searching the local file is additionally added to the electrocardiograph.
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 search method based on an index file according to an embodiment of the present invention;
Fig. 2 is a schematic diagram of a search method based on index files according to a second embodiment of the present invention;
Fig. 3 is a schematic diagram of an apparatus structure of a search apparatus based on an index file 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 further explained in detail by way of examples, the following brief description of the index document mentioned herein is provided.
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 record data, each index record data corresponds to a data file. The data format of the index record data includes a plurality of data fields: an index record identification field, a data file name field, a file category field, a file creation date field, a file creation time field, a patient identification field, a patient name field, a patient gender field, a patient age field, a patient analysis result data field, and the like; the index record identification field is used for uniquely identifying each index record data, and information such as a data file name field, a file type field, a file creation date field, a file creation time field, a patient identification field, a patient name field, a patient sex field, a patient age field, a patient analysis result data field and the like is consistent with information in a data file corresponding to the index record data. When the index file is subjected to keyword search, the field types of several fields, namely a data file name field, a file type field, a file creation date field, a file creation time field, a patient identification field, a patient name field, a patient gender field and a patient age field, are used as the keyword types to realize the directional search.
The electrocardiograph stores massive data information on a local storage carrier, and in order to match with effective search of massive data, a file search function (such as full-text search, keyword search, and the like) similar to the data search function, which is convenient for a user, needs to be provided for the user, and when the user starts a search by selecting a search mode through a human-computer interaction interface of the electrocardiograph, the electrocardiograph needs to initiate a data file search processing flow corresponding to the search mode selected by the user by configuring a search mode identifier, as shown in fig. 1, which is a schematic diagram of a search method based on an index file provided by an embodiment of the present invention, the method mainly includes the following steps:
Step 1, receiving a selection of a search mode by a user by an electrocardiograph to generate a search mode identifier;
Wherein the search pattern identifier includes a full text search pattern and a keyword search pattern.
Here, the electrocardiograph provides a variety of human-computer interface ways to the user: 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 search processing flow based on the index file started in the step 1 has a customized activation means under each interactive mode: the user uses the customized mode interface with the search mode to activate in the API mode, the user uses the keyboard, the mouse and other information input devices of the electrocardiograph to input the customized mode instruction with the search mode to activate in the instruction mode, and the user uses the keyboard, the mouse, the touch screen and other information input devices of the electrocardiograph to select the file search function provided in the interface to generate the customized mode instruction with the search mode to activate in the window mode; 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 search mode transmitted to the electrocardiograph by the user through the human-computer interface comprises a full-text search mode and a keyword search mode;
Subsequently, after acquiring the search mode from the human-computer interface, the electrocardiograph sets the search mode identifier according to the search mode: the search pattern identifier is set to a full text search pattern when the search pattern is a full text search pattern, and is set to a keyword search pattern when the search pattern is a keyword search.
Step 2, the electrocardiograph executes file searching operation in a local storage carrier according to the preset index file name to generate a file handle identifier;
The method specifically comprises the following steps: the electrocardiograph carries out file retrieval operation on all files stored in the storage carrier according to the index file names; if the file matched with the index file name is retrieved, a unique identifier is distributed to the file to generate a file handle identifier; if no file matching the index file name is retrieved then the file handle identifier is set to null.
Step 3, when the file handle identifier is not empty, setting the file corresponding to the file handle identifier as an index file by the electrocardiograph;
The index file comprises a record counter and a plurality of index record data; the index record data includes at least a data file name field, a file category field, a file creation date field, a file creation time field, a patient identification field, a patient name field, a patient gender field, and a patient age field.
In summary, step 2-3 is to solve the index file location problem. As introduced above, there must be an index file on the storage carrier of the electrocardiogram machine, which is used to establish the correspondence with all data files; therefore, before searching the data file, the index file needs to be located in advance, and then the search operation on all the data files can be completed only by retrieving the content of the index file without traversing the content of all the files on the storage carrier. The file handle identifier generated in the locating process is a common return result (which can be understood as a pointer) for file retrieval processing in an embedded operating system of the electrocardiograph, and the electrocardiograph sets an access interface of a file corresponding to a handle according to the file handle identifier.
Step 4, the electrocardiograph searches the index record data corresponding to the index file according to the search mode identifier; when the search mode identifier is a full text search mode, the electrocardiograph performs full record search operation on the index file according to the record counter to generate a file list; when the search mode identifier is a keyword search mode, the electrocardiograph selects an operation result according to the keyword type of the user and inputs the operation result to generate a keyword type and a search keyword, and performs keyword search operation on the index file according to the record counter, the search keyword and the keyword type to generate a file list;
The keyword types at least comprise a data file name type, a file category type, a file creation date type, a file creation time type, a patient identification type, a patient name type, a patient gender type and a patient age type;
The method specifically comprises the following steps: step 41, when the search mode identifier is a full text search mode, the electrocardiograph performs full record search operation on the index file according to the record counter to generate a file list; turning to step 5;
The method specifically comprises the following steps: step 411, when the search mode identifier is the full text search mode, initializing the first index value to 1, initializing the first total number to a recording counter, and initializing the first temporary file list to null;
Here, index record data polling is performed on the index file by taking the record counter as the maximum value, the first index indicates that the index file is polled from the 1 st record from the beginning, and the first index jumps to the next index record data every time the first index performs an operation of adding 1;
Step 412, extracting index record data corresponding to the first index from the index file by the electrocardiograph, and adding the index record data to the first temporary file list;
Here, when the search mode identifier is the full text search mode, all index record data included in the index file are extracted into the input file list;
Step 413, the electrocardiograph adds 1 to the first index;
Step 414, the electrocardiograph determines whether the first index is greater than the first total number, if the first index is greater than the first total number, go to step 415, and if the first index is less than or equal to the first total number, go to step 412;
Here, when the first index is greater than the record counter, it means that the last index of the index file has been polled to record data, and the file list has been completely acquired;
Step 415, the electrocardiograph sets the file list as a first temporary file list; turning to step 5;
Step 42, when the search mode identifier is the keyword search mode, the electrocardiograph generates a keyword type and a search keyword according to the keyword type selection operation result and the search keyword input operation result of the user, and performs keyword search operation on the index file according to the record counter, the search keyword and the keyword type to generate a file list;
The method specifically comprises the following steps: step 421, when the search mode identifier is the keyword search mode, the electrocardiograph obtains the keyword type selection operation result of the user to generate a keyword type, and obtains the search keyword input operation result of the user to generate a search keyword;
Here, when the search pattern identifier is the keyword search pattern, it is described that a search is required according to the keyword, and a file list is output; the keyword search mode of the embodiment of the invention needs two input parameters: a keyword type and a search keyword, where the keyword type is a specific classification of the input search keyword (e.g., when the keyword type is a patient name type, i.e., when a search by name keyword is performed, then the input search keyword is a specific name, such as zhang);
Here, the data record data includes 8 data fields: a data file name field, a file category field, a file creation date field, a file creation time field, a patient identification field, a patient name field, a patient gender field, and a patient age field; the corresponding keyword types also include 8 keyword types: a data file name type, a file category type, a file creation date type, a file creation time type, a patient identification type, a patient name type, a patient gender type, and a patient age type; that is to say, the keyword search mode of the embodiment of the present invention supports at least 8 specific keyword search modes: searching by file name keyword, searching by file date keyword, searching by file time keyword, searching by patient identification keyword, searching by patient name keyword, searching by patient gender keyword, and searching by patient age keyword;
The electrocardiograph provides a plurality of human-computer interaction interface modes for a user, and obtains the keyword types and the search keywords input by the user through the human-computer interaction interfaces: in the API mode, a user transmits a keyword type and a search keyword to the electrocardiogram machine by using a keyword search interface; in the instruction mode, a user inputs a keyword search instruction to the electrocardiograph by using information input equipment such as a keyboard, a mouse and the like of the electrocardiograph, and transmits the keyword type and the search keyword to the electrocardiograph; in a window mode, a user clicks a keyword search mode provided in an interface by using information input equipment such as a keyboard, a mouse, a touch screen and the like of the electrocardiograph to generate a keyword type and transmits the keyword type to the electrocardiograph, and a keyword input box provided in the interface inputs a search keyword to generate a search keyword and transmits the search keyword to the electrocardiograph;
Step 422, the electrocardiograph initializes the value of the second index to 1, initializes the second total number to a recording counter, and initializes the second temporary file list to null;
Step 423, the electrocardiograph extracts the index record data corresponding to the second index from the index file to generate second index record data;
Here, index record data polling is performed on the index file by taking the record counter as the maximum value, the second index starts from 1 to indicate that the index is polled from the 1 st record, and the second index jumps to the next index record data every time the second index performs an operation of adding 1;
Step 424, the electrocardiograph extracts a field corresponding to the keyword type from the second index record data to generate a second index field;
Specifically, the method comprises the following steps: when the keyword type is a data file name type, extracting a data file name field from the second index record data to generate a second index field;
When the keyword type is a file type, extracting a file type field from the second index record data to generate a second index field;
When the keyword type is a file creation date type, extracting a file creation date field from the second index record data to generate a second index field;
When the keyword type is a file creation time type, extracting a file creation time field from the second index record data to generate a second index field;
When the keyword type is the patient identification type, extracting a patient identification field from the second index record data to generate a second index field;
When the keyword type is the patient name type, extracting the patient name field from the second index record data to generate a second index field;
When the keyword type is the patient gender type, extracting a patient gender field from the second index record data to generate a second index field;
When the keyword type is the patient age type, extracting the patient age field from the second index record data to generate a second index field;
Here, from the index record data of the index file, extracting the data field in the index record data matched with the keyword type to assign a value to the second index field, wherein the second index field is used for performing keyword comparison with the input search keyword; the second index field corresponds to 8 types of keyword types and also has corresponding 8 types of field extraction results;
Step 425, the electrocardiograph determines whether the second index field is equal to the search key, goes to step 426 if the second index field is equal to the search key, and goes to step 427 if the second index field is not equal to the search key;
Step 426, the electrocardiograph adds the second index record data to the second temporary file list;
Here, it is assumed that the input search keyword is "first file", and if the keyword type is "data file name type", all index record data of which all data file name fields are "first file" in the index file are extracted and added to the second temporary file list; after the last record addition is completed, the second temporary file list will include a list of all files stored on the electrocardiograph named "first files";
If the input search keyword is a data file, and if the keyword type is a file type, all index record data with file type fields of the data file in the index file are extracted, and are added to the second temporary file list; after the last record addition is complete, the second temporary file list will include a file list of all data files stored on the electrocardiograph;
If the input search keyword is "19990102" (1/2/1999), and the keyword type is "file creation date type", all index record data of all file creation date fields in the index file are "19990102" (1/2/1999) are extracted and added to the second temporary file list; after the last record addition is complete, the second temporary file list will include all the file listings stored on the electrocardiograph on the current day of 1 month 2 year 1999;
If the input search keyword is "142530" (14: 25 min 30 sec), and the keyword type is "file creation time type", all index record data with file creation time field of "142530" (14: 25 min 30 sec) in the index file are extracted and added to the second temporary file list; after the last record addition is complete, the second temporary file list will include a list of data files stored on the electrocardiograph at 14 points per day for 25 minutes and 30 seconds;
If the input search keyword is ID001, and if the keyword type is patient identification type, all index record data with the patient identification field of ID001 in the index file are extracted and added to the second temporary file list; after the last record addition is complete, the second temporary file list will include all data file listings stored on the electrocardiograph that belong to the patient identified as ID 001;
If the input search keyword is Zhang III, and if the keyword type is a patient name type, all index record data of which the patient name fields are Zhang III in the index file are extracted, and are added to the second temporary file list; after the last record is added, the second temporary file list will include all data file lists of the patient named Zhang III stored on the electrocardiograph;
If the input search keyword is male, and the keyword type is patient gender type, all index record data of which all patient gender fields are male in the index file are extracted and added to the second temporary file list; after the last record addition is complete, the second temporary file list will include a list of data files for all male patients stored on the electrocardiograph;
If the input search keyword is '50', and if the keyword type is 'patient age type', all index record data with the patient age field of '50' in the index file are extracted and added to the second temporary file list; after the last record addition is complete, the second temporary file list will include all age 50 patient data file listings stored on the electrocardiograph;
Step 427, the electrocardiograph adds 1 to the second index;
Step 428, the electrocardiograph determines whether the second index is greater than the second total number, if so, go to step 429, and if not, go to step 423;
Here, when the second index is greater than the record counter, it means that the last index of the index file has been polled to record data, and the file list has been completely acquired;
Step 429, the electrocardiograph sets the file list to the second temporary file list.
And 5, when the file list is not empty, the electrocardiograph sends the file list as a search result to the user.
Here, the electrocardiograph provides a plurality of human-computer interaction interface modes for the user, and the electrocardiograph displays information of search results for the user through the plurality of human-computer interaction interfaces: in the API mode, the electrocardiograph transmits the searched file list to the user by using a file list interface; in the instruction mode, an electrocardiograph instruction console sends a searched file list; in the window mode, the electrocardiograph displays the searched file list to the user by using a window display device.
To further explain the keyword search mode of the embodiment of the present invention, the implementation process of the present invention is explained with a specific search case (search according to the keyword search mode, the searched keyword type is the gender type of the patient, the specific search keyword for the gender type of the patient is "woman", that is, data files of all female patients are searched on the storage carrier of the electrocardiograph), as shown in fig. 2, which is a schematic diagram of a search method based on an index file provided by the second embodiment of the present invention, the method mainly includes the following steps:
Step 101, after a user selects a keyword searching mode on a electrocardiogram machine, continuously selecting to search according to the keywords of the sex of the patient and inputting a searching keyword as 'woman'; the electrocardiograph sets the search pattern identifier as a keyword search pattern, sets the keyword type as a patient gender type, and sets the search keyword as "woman".
Here, the electrocardiograph specifically provides a human-computer interaction interface in a window manner for a user, and provides a data file search function on a main interface of the window; after the user clicks on the data file search function, the electrocardiograph displays two search mode options to the user: a full text search option and a keyword search option; after the user clicks the keyword search option, the electrocardiograph displays 8 keyword search modes to the user: searching by file name keyword, searching by file date keyword, searching by file time keyword, searching by patient identification keyword, searching by patient name keyword, searching by patient gender keyword, and searching by patient age keyword; the user clicks one of the keyword search modes: after searching according to the sex keywords of the patient, the electrocardiograph provides a keyword input box for a user to input search keywords; the user inputs specific search keywords using the keyword entry box: "woman";
102, the electrocardiograph executes file searching operation in a local storage carrier according to a preset index file name to generate a file handle identifier;
The method specifically comprises the following steps: the electrocardiograph carries out file retrieval operation on all files stored in the storage carrier according to the index file names; if the file matched with the index file name is retrieved, a unique identifier is distributed to the file to generate a file handle identifier; if no file matching the index file name is retrieved then the file handle identifier is set to null.
103, when the file handle identifier is not empty, setting a file corresponding to the file handle identifier as an index file by the electrocardiograph;
The index file comprises a record counter and a plurality of index record data; the index record data includes at least a data file name field, a file category field, a file creation date field, a file creation time field, a patient identification field, a patient name field, a patient gender field, and a patient age field.
In summary, steps 102-103 are directed to solving the index file location problem. As introduced above, there must be an index file on the storage carrier that is used to establish correspondence with all data files. The file handle identifier is a file retrieval result (which may be understood as a pointer) commonly found in the embedded operating system, and conventionally, an access location of a corresponding file is obtained according to the file handle identifier.
Assuming that the contents of index record data of the index file according to the present embodiment are as described in the following table, the record counter is 4:
Figure BDA0002419214410000161
Watch 1
And 104, polling all index record data of the index file by the electrocardiograph, extracting all index record data with the same patient gender field and the same search keyword, and generating a file list.
Here, the electrocardiograph-derived file list includes record 1, record 3, and record 4.
And 105, converting the file list into display information by the electrocardiograph, and displaying the information of the search result to the user.
Here, the electrocardiograph converts the display information of the records 1, 3, and 4 included in the file list, and displays the file search result information to the user through the window of the electrocardiograph. The display modes are various, and can be comprehensive display by using a form structure or sequential sequencing display of records in a file list, and the specific implementation is determined by engineering implementation requirements.
As shown in fig. 3, which is a schematic structural diagram of an apparatus of a search device based on an index file 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.
The embodiment of the invention provides a searching method and a searching device based on an index file, which execute different searching processing flows by identifying a searching mode identifier: when the search mode identifier is a full text search mode, performing full record search on the content of the index file and outputting a file list; and when the search mode identifier is a keyword mode, performing keyword search on the content of the index file according to the input search keyword and the keyword type and outputting a file list. By using the method and the device, the efficiency of browsing the local files in full text by the electrocardiograph can be improved, and the function of directionally searching the local files is additionally added to the electrocardiograph, so that the problem of file access efficiency after a large-capacity storage carrier is loaded in the conventional electrocardiograph is solved, the utilization rate of large-capacity data can be improved by means of the newly added directional searching function, and the problem of data file inactivation caused by huge data volume and laggard searching function is avoided.
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 (9)

1. A search method based on index files is characterized by comprising the following steps:
Receiving a selection of a search mode by a user by the electrocardiograph to generate a search mode identifier; the search pattern identifier includes a full text search pattern and a keyword search pattern;
The electrocardiograph executes file searching operation in a local storage carrier according to a preset index file name to generate a file handle identifier;
When the file handle identifier is not empty, the electrocardiograph sets the file corresponding to the file handle identifier as an index file; the index file comprises a record counter and a plurality of index record data;
The electrocardiograph searches index record data corresponding to the index file according to the search mode identifier; when the search mode identifier is the full text search mode, the electrocardiograph performs full record search operation on the index file according to the record counter to generate a file list; when the search mode identifier is the keyword search mode, the electrocardiograph generates a keyword type and a search keyword according to a keyword type selection operation result and a search keyword input operation result of the user, and performs keyword search operation on the index file according to the record counter, the search keyword and the keyword type to generate the file list;
And when the file list is not empty, the electrocardiograph sends the file list to the user as a search result.
2. The index file-based search method according to claim 1,
The index record data at least comprises a data file name field, a file category field, a file creation date field, a file creation time field, a patient identification field, a patient name field, a patient gender field and a patient age field;
The keyword types include at least a data file name type, a file category type, a file creation date type, a file creation time type, a patient identification type, a patient name type, a patient gender type, and a patient age type.
3. The index file-based search method of claim 2, wherein the electrocardiograph performs a file lookup operation in a local storage carrier according to a preset index file name to generate a file handle identifier, and specifically comprises:
The electrocardiograph carries out file retrieval operation on all files stored in the storage carrier according to the index file names; if the file matched with the index file name is retrieved, a unique identifier is allocated to the file to generate the file handle identifier; setting the file handle identifier to null if no file matching the index file name is retrieved.
4. The index file-based search method according to claim 2, wherein when the search mode identifier is the full text search mode, the electrocardiograph performs a full record search operation on the index file according to the record counter to generate a file list, specifically comprising:
Step 41, when the search mode identifier is the full text search mode, initializing a value of a first index to be 1, initializing a first total number to be the recording counter, and initializing a first temporary file list to be null by the electrocardiograph;
Step 42, the electrocardiograph extracts the index record data corresponding to the first index from the index file and adds the index record data to the first temporary file list;
Step 43, the electrocardiograph adds 1 to the first index;
Step 44, the electrocardiograph determines whether the first index is greater than the first total number, and goes to step 45 if the first index is greater than the first total number, and goes to step 42 if the first index is less than or equal to the first total number;
And step 45, setting the file list as the first temporary file list by the electrocardiograph.
5. The index file-based search method according to claim 2, wherein, when the search mode identifier is the keyword search mode, the electrocardiograph generates a keyword type and a search keyword according to a keyword type selection operation result and a search keyword input operation result of the user, and performs a keyword search operation on the index file according to the record counter, the search keyword, and the keyword type to generate the file list, specifically comprising:
Step 51, when the search mode identifier is the keyword search mode, the electrocardiograph obtains a keyword type selection operation result of the user to generate the keyword type, and obtains a search keyword input operation result of the user to generate the search keyword;
Step 52, initializing a value of a second index of 1, initializing a second total number of the recording counters, and initializing a second temporary file list to be null by the electrocardiograph;
Step 53, the electrocardiograph extracts the index record data corresponding to the second index from the index file to generate second index record data;
Step 54, the electrocardiograph extracts a field corresponding to the keyword type from the second index record data to generate a second index field;
Step 55, the electrocardiograph determines whether the second index field is equal to the search key, and if the second index field is equal to the search key, the step 56 is performed, and if the second index field is not equal to the search key, the step 57 is performed;
Step 56, the electrocardiograph adds the index record data to the second temporary file list according to the second index record data;
Step 57, the electrocardiograph adds 1 to the second index;
Step 58, the electrocardiograph determines whether the second index is greater than the second total number, and goes to step 59 if the second index is greater than the second total number, and goes to step 53 if the second index is less than or equal to the second total number;
Step 59, the electrocardiograph sets the file list as the second temporary file list.
6. The index file-based search method according to claim 5, wherein the electrocardiograph extracts a field corresponding to the keyword type from the second index record data to generate a second index field, and specifically comprises:
When the keyword type is the data file name type, the electrocardiograph extracts the data file name field from the second index record data to generate a second index field;
When the keyword type is the file type, the electrocardiograph extracts the file type field from the second index record data to generate a second index field;
When the keyword type is the file creation date type, the electrocardiograph extracts the file creation date field from the second index record data to generate a second index field;
When the keyword type is the file creation time type, the electrocardiograph extracts the file creation time field from the second index record data to generate a second index field;
When the keyword type is the patient identification type, the electrocardiograph extracts the patient identification field from the second index record data to generate a second index field;
When the keyword type is the patient name type, the electrocardiograph extracts the patient name field from the second index record data to generate a second index field;
When the keyword type is the patient gender type, the electrocardiograph extracts the patient gender field from the second index record data to generate a second index field;
When the keyword type is the patient age type, the electrocardiograph extracts the patient age field from the second index record data to generate the second index field.
7. An apparatus, comprising a memory for storing a program and a processor for performing the method of any of claims 1 to 6.
8. 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 6.
9. 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 6.
CN202010205056.6A 2020-03-20 2020-03-20 Index file-based searching method and device Active CN111429987B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010205056.6A CN111429987B (en) 2020-03-20 2020-03-20 Index file-based searching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010205056.6A CN111429987B (en) 2020-03-20 2020-03-20 Index file-based searching method and device

Publications (2)

Publication Number Publication Date
CN111429987A true CN111429987A (en) 2020-07-17
CN111429987B CN111429987B (en) 2023-05-09

Family

ID=71555373

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010205056.6A Active CN111429987B (en) 2020-03-20 2020-03-20 Index file-based searching method and device

Country Status (1)

Country Link
CN (1) CN111429987B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070000820A (en) * 2005-06-28 2007-01-03 한국전자통신연구원 Apparatus and method for fast converting vpi/vci index
CN104572858A (en) * 2014-12-19 2015-04-29 深圳市理邦精密仪器股份有限公司 Method and system for data matching between electrocardiograph and electrocardio working station
CN105183884A (en) * 2015-09-24 2015-12-23 西安未来国际信息股份有限公司 Search engine system and method based on big data technique
US20160103906A1 (en) * 2013-05-16 2016-04-14 University Of Utah Research Foundation Generating and implementing local search engines over large databases
CN108294745A (en) * 2018-03-07 2018-07-20 武汉大学 P waves, T wave start-stop point detecting methods and system in multi-lead ECG signal
CN110019292A (en) * 2017-09-06 2019-07-16 华为技术有限公司 A kind of querying method and device of data

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070000820A (en) * 2005-06-28 2007-01-03 한국전자통신연구원 Apparatus and method for fast converting vpi/vci index
US20160103906A1 (en) * 2013-05-16 2016-04-14 University Of Utah Research Foundation Generating and implementing local search engines over large databases
CN104572858A (en) * 2014-12-19 2015-04-29 深圳市理邦精密仪器股份有限公司 Method and system for data matching between electrocardiograph and electrocardio working station
CN105183884A (en) * 2015-09-24 2015-12-23 西安未来国际信息股份有限公司 Search engine system and method based on big data technique
CN110019292A (en) * 2017-09-06 2019-07-16 华为技术有限公司 A kind of querying method and device of data
CN108294745A (en) * 2018-03-07 2018-07-20 武汉大学 P waves, T wave start-stop point detecting methods and system in multi-lead ECG signal

Also Published As

Publication number Publication date
CN111429987B (en) 2023-05-09

Similar Documents

Publication Publication Date Title
US11720598B2 (en) Data analysis engine
US10366154B2 (en) Information processing device, information processing method, and computer program product
CN111161804B (en) Query method and system for species genomics database
CN110826302A (en) Questionnaire creating method, device, medium and electronic equipment
CN111782635B (en) Data processing method and device, storage medium and electronic device
JP2015060259A (en) Data analysis support system
CN110309232A (en) Visual medical data analysis method and system
CN113807062A (en) Online drawing method and device for combined density map and electronic equipment
US20160328110A1 (en) Method, system, equipment and device for identifying image based on image
CN111400258B (en) Data file storage method and device
CN112699214A (en) Keyword matching analysis direct system and method
EP4209928A2 (en) Method, apparatus and system for processing makeup, electronic device and storage medium
CN112286879B (en) Metadata-based data asset construction method and device
CN111429987B (en) Index file-based searching method and device
CN111429200A (en) Content association method and device, storage medium and computer equipment
CN107818152B (en) Plant retrieval method and system
CN115860531A (en) Service experience management system and method based on multi-dimensional data
CN113569114A (en) Visual display method and device for system data
WO2020070906A1 (en) Workshop assistance system and workshop assistance method
JP4434876B2 (en) Form search device, form search system, form search method and program thereof
CN112306312A (en) Data processing method, data processing system, information creating method and device
CN112328837A (en) Data display method, device, equipment and storage medium
CN111414335B (en) Data file searching method and device
CN114691837B (en) Insurance business data processing method and processing system based on big data
JP2013109514A (en) Related word display controller, related word display method, and program

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