Clinical electroencephalogram data reading method and apparatus, and device and medium
By integrating and generating files and event lists of EEG data, the problem of inconsistent data management across different times and devices is solved, enabling efficient data management and display, supporting batch analysis, and improving efficiency in clinical and research settings.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-01-03
- Publication Date
- 2026-03-12
AI Technical Summary
In existing technologies, EEG data management is inefficient, making it impossible to uniformly view and manage examination data from different times and devices. Furthermore, the incompatibility between devices from different manufacturers leads to low efficiency in data presentation and management.
The system integrates EEG data from the same patient into a single path, generates a file list and an event list, obtains data storage, acquisition process, and event tag information through metadata, generates event summaries, and processes tag inheritance of trimmed files based on derivative relationships, thereby merging and outputting the file and event lists.
It enables complete management of EEG data from the same patient, supports chronological and relational display, improves data accessibility and management efficiency, and supports batch analysis to meet clinical and research needs.
Smart Images

Figure CN2025070308_12032026_PF_FP_ABST
Abstract
Description
A clinical electroencephalogram data reading method, device, equipment and medium TECHNICAL FIELD
[0001] The present application relates to a clinical electroencephalogram data reading method, device, equipment and medium, and belongs to the field of electroencephalogram data presentation. BACKGROUND
[0002] In a clinical hospital, electroencephalogram examination is crucial for diagnosing and treating nervous system diseases such as epilepsy. However, as shown in FIG. 1, although the manufacturer's software provides a file list for staff to review and manage data, the list cannot display the events occurring in the electroencephalogram file, and the contents of the event tags can only be viewed by opening the file. Sometimes when clinical personnel need to perform file management operations such as moving and copying files through the folder system (file explorer), they cannot know the events occurring in each electroencephalogram file.
[0003] In addition, the electroencephalogram examination of a patient during hospitalization is often intermittent, and the examination data at different times and on different devices cannot be uniformly viewed and managed, and the examination results of the patient cannot be efficiently explained. Moreover, due to the incompatibility of electroencephalogram devices from different manufacturers, they cannot be uniformly reviewed. Various reasons lead to low efficiency of electroencephalogram data presentation and management. SUMMARY
[0004] The present application aims to at least solve one of the technical problems in the prior art. To this end, in view of the above problems, the purpose of the present application is to provide a clinical electroencephalogram data reading method, device, equipment and medium, which can integrate the electroencephalogram data of the same patient, provide a file list that can display event content information and file path, and help staff improve data reviewability and management efficiency.
[0005] In order to achieve the purpose of the application, the technical scheme provided by the present application is:
[0006] In a first aspect, the present application provides a clinical electroencephalogram data reading method, which comprises: arranging electroencephalogram data of the same patient scattered in different paths into a set same path to form a path of the electroencephalogram data of the patient, wherein the electroencephalogram data comprises original files and clipping files; obtaining data storage information based on metadata of the electroencephalogram data to generate a first file list, wherein the first file list comprises path information where the electroencephalogram data is located; obtaining electroencephalogram acquisition process information based on the metadata of the electroencephalogram data to generate a second file list; obtaining event tag information based on the metadata of the electroencephalogram data, and generating a first event list, a second event list and a third event list based on the first file list and the second file list, wherein the first event list comprises path information where the electroencephalogram data is located, the second event list comprises electroencephalogram acquisition process information, and the third event list comprises event content and event time information, wherein the specific process of the first event list, the second event list and the third event list is that the event tag information contains the time and content of the event tag, a record line is established for each event tag to save the absolute time, relative time and event content of the event; the third event list comprises the time and content of all event tags of the patient; for each record line in the third event list, the corresponding first event list information, i.e., the data storage information, and the second event list information, i.e., the electroencephalogram acquisition process information, are supplemented; if a plurality of events are contained in one electroencephalogram file unit package, the data storage information and the electroencephalogram acquisition process information of the record lines of these event tags are the same; the same event content existing in the same electroencephalogram file unit package in the third event list is de-duplicated to form event summary information to generate a third file list, wherein the third file list comprises the event summary information; the first file list, the second file list and the third file list are merged to obtain a file list main shaft; the first event list, the second event list and the third event list are merged to obtain an event list main shaft; and the record lines from the clipping files in the file list main shaft and the event list main shaft are identified based on the metadata of the electroencephalogram data, and they are moved to a file list branch and an event list branch, respectively, comprising: the metadata of each electroencephalogram file unit package has an identifier identifying whether the unit package is an original file or a clipping file, and the record lines from the clipping files in the two lists are separated by identifying the identifier; the record lines in the main shaft and the branch all comprise information in the first list, the second list and the third list; for each record line in the file list branch, the record line in the file list main shaft is matched according to the acquisition start time of the record line in the file list branch, and the branch record line is moved to the right side of the same line of the main shaft record line to represent the derivative relationship in the original file and the clipping file, comprising: the file list main shaft is all the record lines from the original file, and the file list branch is all the record lines from the clipping file; based on the metadata information, the record lines of the clipping files can be matched with the record lines of the original files to clearly show the derivative relationship in the original file and the clipping file;The start time of the collection of the cropped file should be within the range of the start time to the end time of the collection of the corresponding original file, and the derivative relationship between the original file and the cropped file is determined by time comparison; or some manufacturers record the information of the original file in the metadata of the cropped file when generating the cropped file, and directly read this relationship, and the file list branch and the file list main shaft are matched to form a complete file list of the patient for output; for each record line in the event list branch, according to the absolute time of the event, the record line in the event list main shaft is matched, and the branch record line is moved to the right side of the same line of the main shaft record line to clearly show the inheritance relationship between the event label in the original file and the event label in the cropped file; if there is no corresponding record line in the main shaft, a new record line is established in the main shaft, and the branch record line is still moved to the right side of the same line of the main shaft record line, and the label information is created according to the current branch record line, that is, the event label information in the cropped file, to realize the reverse inheritance of the event label information from the cropped file to the original file; wherein the event list main shaft is a record line from the original file, and the event list branch is a record line from the cropped file; based on the metadata information, the record line of the cropped file can be matched with the record line of the original file to clearly show the inheritance relationship between the event label in the original file and the event label in the cropped file, if an event label is marked in the original file, and the collection time of the cropped file contains this event, then this event label will be inherited to the cropped file; at this time, the event absolute time and the event content of the event label in the two places are consistent; because the start time of the collection of the cropped file is usually different from the start time of the collection of the original file, the relative time of the event label in the two places is different, and the event label in the cropped file is matched with the event label in the original file by using the consistent rule of absolute time and content to clearly show the inheritance relationship between the two; if the original file is cropped first to generate a cropped file, and then the event label is marked in the cropped file, then the original file will lack the corresponding event label, resulting in the lack of the corresponding record line in the event list main shaft; by traversing each record line of the event list branch, the record lines that cannot be matched can be found; a new record line is established in the event list main shaft to match the two; the information in the newly established record line in the main shaft can be completed by using the existing event label information, and it is noted that the record line is reversely inherited from the event label in the cropped file, and the event list branch and the event list main shaft are matched to form a complete event list of the patient for output; the file list main shaft and the file list branch are merged to obtain the final file list for output; the event list main shaft and the event list branch are merged to obtain the final event list for output.
[0007] In a second aspect, the present application provides a clinical electroencephalogram data reading device, which comprises: a path generating unit configured to arrange electroencephalogram data of the same patient scattered in different paths into a set same path to form a path of the electroencephalogram data of the patient, wherein the electroencephalogram data comprises original files and clipping files; a list generating unit configured to obtain data storage information based on metadata of the electroencephalogram data to generate a first file list, wherein the first file list comprises path information where the electroencephalogram data is located; obtain electroencephalogram acquisition process information based on the metadata of the electroencephalogram data to generate a second file list; obtain event label information based on the metadata of the electroencephalogram data, and generate a first event list, a second event list and a third event list based on the first file list and the second file list, wherein the first event list comprises path information where the electroencephalogram data is located, the second event list comprises electroencephalogram acquisition process information, and the third event list comprises event content and event time information; remove the same event content existing in the same electroencephalogram file unit package in the third event list to form event summary information, and form a third file list, wherein the third file list comprises the event summary information; merge the first file list, the second file list and the third file list to obtain a file list main shaft; merge the first event list, the second event list and the third event list to obtain an event list main shaft; and identify record lines from the clipping files in the file list main shaft and the event list main shaft based on the metadata of the electroencephalogram data, and move them to a file list branch and an event list branch, respectively; for each record line in the file list branch, match a record line in the file list main shaft according to the acquisition start time thereof, and move the branch record line to the right side of the same line of the main shaft record line to represent the derivative relationship between the original files and the clipping files; for each record line in the event list branch, match a record line in the event list main shaft according to the absolute time of the event thereof, and move the branch record line to the right side of the same line of the main shaft record line to clearly show the inheritance relationship between the event label in the original files and the event label in the clipping files; if there is no corresponding record line in the main shaft, a new record line is established in the main shaft, and the branch record line is still moved to the right side of the same line of the main shaft record line, and the label information is created according to the event label information in the current branch record line, i.e. the event label information in the clipping file, to realize reverse inheritance of the event label information from the clipping file to the original file, wherein the event list main shaft is all record lines from the original files, and the event list branch is all record lines from the clipping files; based on the metadata information, the record lines of the clipping files and the record lines of the original files can be matched to clearly show the inheritance relationship between the event label in the original files and the event label in the clipping files, if an event label is marked in the original files, and the acquisition time of the clipping files contains the event, the event label will be inherited to the clipping files; at this time, the event absolute time and the event content of the event labels in the two places are consistent;Because the collection start time of the cropped file is usually different from the collection start time of the original file, the relative time of the event labels at the two places is different. The event labels in the cropped file and the event labels in the original file are matched using the absolute time and the consistent rule of content to clarify the inheritance relationship between the two. If the original file is cropped first to generate a cropped file, and then the event labels are labeled in the cropped file, the corresponding event labels will be missing in the original file, resulting in a lack of corresponding record lines in the main axis of the event list. By traversing each record line of the event list branch, the unmatched record lines can be found. New record lines are established in the main axis of the event list to match the two. The information in the newly established record lines in the main axis can be completed using the existing event label information, and it is noted that the record lines are reversely inherited from the event labels in the cropped file. The event list branch and the event list main axis are matched to form a complete event list of the patient and are output. The specific process of generating the first event list, the second event list and the third event list is as follows: the first file list, the second file list and the third file list are merged to obtain a file list main axis; the first event list, the second event list and the third event list are merged to obtain an event list main axis; and based on the metadata of the electroencephalogram data, the record lines from the cropped file in the file list main axis and the event list main axis are identified and moved to the file list branch and the event list branch, respectively. The metadata of each electroencephalogram file unit package has an identifier indicating whether the unit package is an original file or a cropped file. The record lines from the cropped file in the two lists are separated by identifying the identifier. The record lines in the main axis and the branch include the information in the first list, the second list and the third list. For each record line in the file list branch, the record line in the file list main axis is matched according to the collection start time, and the branch record line is moved to the right side of the same line of the main axis record line to represent the derivative relationship in the original file and the cropped file. The file list main axis is a record line from the original file, and the file list branch is a record line from the cropped file. Based on the metadata information, the record lines of the cropped file and the record lines of the original file can be matched to clarify the derivative relationship in the original file and the cropped file. The collection start time of the cropped file should be within the collection start time to the end time of the corresponding original file. The derivative relationship in the original file and the cropped file is determined by time comparison. Alternatively, some manufacturers record the information of the original file in the metadata of the cropped file when generating the cropped file, and the relationship is directly read. The file list branch and the file list main axis are matched to form a complete file list of the patient and are output. The event list main axis and the event list branch are combined to obtain a final event list of a patient and are output.The file lists or event lists of a plurality of patients are combined to obtain a database file list or a database event list for output; according to a specific event keyword set by a user, a record line of specific event content is extracted from the database file list, and a specific event file list is obtained by combination for output.
[0008] In a third aspect, the present application also provides an electronic device, comprising: at least one processor; and a memory connected with the processor in communication; wherein the memory stores instructions executable by the processor, and the instructions are executed by the processor to enable the processor to perform any of the methods.
[0009] In a fourth aspect, the present application also provides a computer-readable storage medium storing one or more programs, the one or more programs comprising computer instructions for causing a computer to perform any of the methods.
[0010] The application has the following characteristics: 1. Patient-centered data management: During the patient's hospitalization, the application can integrate and manage all electroencephalogram data of the patient at different time periods and on different devices. No matter when and where the examination is conducted, as long as it is the examination result of the same patient, the system will automatically gather together to form a complete patient data record, facilitating doctors to conduct comprehensive diagnosis and treatment. 2. Time-axis-based management logic: The list of the application contains the acquisition time information involved in each record line, which can be sorted according to time sequence to arrange and display all electroencephalogram data of the patient in chronological order, so that doctors can clearly see the examination results of the patient at different time periods, facilitating tracking and analysis of changes in the patient's condition. 3. Branch-based clipping file management: Based on the time-axis, the application supports displaying the derivative relationship between the original file and the clipping file of the electroencephalogram data. The clipping file, as a branch of the time-axis, can supplement the missing event tag information in the original file, realize reverse inheritance of event tags, and improve the metadata integrity of the original data, which is very important in continuous data processing. 4. Based on the metadata of electroencephalogram data, the application generates an event summary by integrating event content information, and generates a file list that can simultaneously display the path of the file unit package and the content information of the event tag in the unit package by integrating other metadata, solving the problem of lack of event content in the existing file list, thereby improving the efficiency of file management. 5. The file list of the application integrates event summaries and file paths together, thereby enabling the function of quickly selecting files by filtering event summaries. The specific event file list generated by this method has formatted file path information and can be used as a directory for batch electroencephalogram data reading, thereby realizing batch analysis function, which is important for long-term electroencephalogram research and artificial intelligence research. 6. While providing a new reading method, the application retains the storage structure provided by the original electroencephalogram manufacturer, so that all electroencephalogram data can still be accessed and played back according to the clinical conventional method, realizing the characteristics of bidirectional service for clinical and scientific research. 7. Compared with the file list presented by the existing technology, the application provides event content information in the form of summaries, which is the key to giving the file list new filtering function. However, event content information cannot be achieved by simply reading event tag data, but must go through the three key steps provided by the application: 1) gathering files of the same patient, 2) reverse inheritance of event tags, and 3) generation of event summaries. The lack of the first two steps will result in incomplete event content information, and the lack of the third step will result in excessive event content, which cannot be normally displayed.The reverse inheritance of the event label is a tricky problem, which requires seeing the content of the event label established in the cropped file in the original file, which is like carving a boat to seek a sword; however, the present application solves this problem by first establishing the derivative relationship between the original file and the cropped file (open the boat back to the original place), and then finding the position of the event label according to the absolute time of the event (get the sword from the marked place).
[0011] In summary, the present application can be widely applied in electroencephalogram data management, mainly applied in clinical hospitals, helping doctors to more efficiently manage and retrieve electroencephalogram data, and improving the accuracy and efficiency of diagnosis and treatment; at the same time, it can also be applied in scientific research, so that scientific researchers can batch retrieve and analyze data, and promote the development of electroencephalogram related research. BRIEF DESCRIPTION OF DRAWINGS
[0012] Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The accompanying drawings are included to provide a description of preferred embodiments, and are not meant to limit the present application. Throughout the drawings, the same reference designations are used to denote like elements. In the drawings:
[0013] FIG. 1 is a schematic diagram of an electroencephalogram file list of the prior art;
[0014] FIG. 2 is a schematic diagram of the file arrangement process of the embodiment of the present application;
[0015] FIG. 3 is a schematic diagram of the concept of each level of folder and file of the embodiment of the present application;
[0016] FIG. 4 is a schematic diagram of the generation principle of the first file list of a patient of the embodiment of the present application;
[0017] FIG. 5 is a schematic diagram of the generation of the second file list of a patient of the embodiment of the present application;
[0018] FIG. 6 is a schematic diagram of the generation of the first, second and third event lists of a patient of the embodiment of the present application;
[0019] FIG. 7 is a schematic diagram of the generation principle of the third file list of a patient of the embodiment of the present application;
[0020] FIG. 8 is a schematic diagram of the generation principle of the main shaft and branch of the patient file list of the embodiment of the present application;
[0021] FIG. 9 is a schematic diagram of the merging process principle of the main shaft and branch of the patient file list of the embodiment of the present application;
[0022] FIG. 10 is a schematic diagram of the patient file list of the embodiment of the present application;
[0023] FIG. 11 is a schematic diagram of the generation principle of the main shaft and branch of the patient event list of the embodiment of the present application;
[0024] Fig. 12 is a schematic diagram of the principle of the patient event list main axis and branch merging process and reverse inheritance process according to an embodiment of the present application;
[0025] Fig. 13 is a schematic diagram of the patient event list according to an embodiment of the present application;
[0026] Fig. 14 is a schematic diagram of the database file list / specific event file list according to an embodiment of the present application. DETAILED DESCRIPTION
[0027] It is to be understood that the terminology used herein is for the purpose of describing particular example embodiments only and is not intended to be limiting. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. The terms "comprises", "comprising", "includes", "including" and "has" are inclusive and therefore specify the presence of stated features, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and / or groups thereof. The method steps, processes, and operations described herein are not to be construed as necessarily requiring their performance in the particular order in which they are described, unless specifically identified as an order dependent step. It is also to be understood that additional or alternative steps can be employed.
[0028] For various reasons, electroencephalogram data presentation and management is inefficient. The present application provides a clinical electroencephalogram data reading method, device, equipment and medium, comprising: gathering electroencephalogram files of the same patient into the same path; based on the metadata of the electroencephalogram data of the patient, obtaining data storage information, electroencephalogram acquisition process information, event label information, etc., and generating a file list main axis and an event list main axis, respectively, wherein for the event label information in the file list, an event summary is formed by string deduplication and the like; based on the metadata, moving the record lines from the cropped files in the two lists to the list branches, and matching the record lines in the branches with the main axis according to the acquisition time or event time; merging the main axis and the branches to generate the file list and the event list of the patient for output; merging the lists of multiple patients to generate the file list and the event list of the database for output; and screening the event summary to generate a specific event file list for output. Therefore, the present application can improve the data accessibility and management efficiency. Therefore, based on the metadata of the electroencephalogram data, the present application generates an event summary by integrating event content information, and generates a file list by integrating other metadata, etc., which can simultaneously display the path of the file unit package and the content information of the event label in the unit package, solving the problem of lack of event content in the existing file list, thereby improving the file management efficiency.
[0029] Exemplary embodiments of the present application will be described in greater detail below with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it is understood that the present application can be embodied in various forms without being limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the application to those skilled in the art.
[0030] In order to make the description of the present application more clear, the related technical terms of the present application are given a definite definition:
[0031] Electroencephalogram: Electroencephalogram is a bioelectric signal generated by the brain collected by an amplifier, the data nature is the voltage amplitude collected by each electrode channel, sampled at a stable frequency in a period of time to obtain a set of time series.
[0032] Electroencephalogram data: refers to the electroencephalogram data file saved by the electroencephalogram device through the collection operation on the patient's brain.
[0033] Metadata of electroencephalogram data: is the data describing this electroencephalogram data, in the present application, specifically includes data storage information, electroencephalogram collection process information, event label information, etc. Among them, the data storage information contains the storage path, folder name and other information of the data; the electroencephalogram collection process information contains the name of the patient, the medical record number, the electroencephalogram number, the sampling rate, the number of channels, the time when the file collection starts, the duration, the number of the file in the data packet and other information; the event label information contains the time information of the event and the content of the event and other information.
[0034] Electroencephalogram file unit package: is the default saving form of electroencephalogram data, is the smallest unit of complete electroencephalogram data, including a piece of electroencephalogram data and its metadata. Electroencephalogram file unit package can exist independently and be read and played back by the original factory reading software. By default, the continuously collected electroencephalogram will be packaged with the collected data at a set period (such as 1 hour) to save into one electroencephalogram file unit package.
[0035] Electroencephalogram file integration package: in the file storage scheme provided by some manufacturers, the electroencephalogram file unit package saved by continuous collection will be placed in a folder, which is called electroencephalogram file integration package in the present application.
[0036] Event: During the electroencephalogram collection process, the patient may receive various forms of stimulation, such as flash stimulation, electrical stimulation, etc., and may also have spontaneous events such as seizures, all information worth recording occurring in the electroencephalogram collection process can be called event.
[0037] Event label: a form of recording events in electroencephalogram data. Event labels can be directly input into electroencephalogram equipment during electroencephalogram acquisition, or added by electroencephalogram staff after the fact through electroencephalogram reading software provided by the manufacturer. Event label information includes the time of event occurrence and the content of the event.
[0038] Clipping: a routine operation in the clinical electroencephalogram workflow. Because clinical electroencephalogram is continuously acquired, but the time of a single seizure may only be 5 to 10 minutes, opening an hour of file package every time will waste time, so 5 to 10 minutes (or longer) of the seizure episode will be clipped to form an independent electroencephalogram file unit package in clinical practice.
[0039] Original file: an electroencephalogram file unit package directly saved by electroencephalogram equipment.
[0040] Clipped file: an electroencephalogram file unit package saved by electroencephalogram reading software by selecting the start time and end time from the original file for clipping operation.
[0041] Absolute time and relative time of event label: absolute time refers to the time of event occurrence, which can be local time or Greenwich Mean Time; relative time refers to the time difference between event occurrence and the start of the electroencephalogram file; it should be noted that because the start time of the clipped file is different from that of the original file, the relative time of the same event label in the original file and the relative time of the same event label in the clipped file are also different.
[0042] Record line: a line of information in a list after the metadata of electroencephalogram data is integrated.
[0043] Embodiment one: the clinical electroencephalogram data reading method provided in this embodiment comprises:
[0044] S1, file arrangement.
[0045] In this embodiment, the specific process of file arrangement is: gathering the files of a patient together, i.e. based on the metadata information of electroencephalogram data such as patient name, medical record number, electroencephalogram number, etc., the patient corresponding to each file can be identified, and then all electroencephalogram data of the same patient is gathered into a folder, including original files and clipped files, which can be named by patient name. Then place this patient folder in a suitable position in the electroencephalogram database for storage, for example, the earliest acquisition time of the patient can be used to place it in the month folder corresponding to this time, for example, but not limited to this.
[0046] As shown in FIG. 2, in order to balance the automatic uploading of data, the electroencephalogram files of the same patient collected in different months are saved in different paths, even if they are continuous records. For example, the electroencephalogram examinations of Li Si, Wang Wu and Zhu Liu are all within a natural month, so there is no problem. However, when Zhang San underwent a period of electroencephalogram examination in March, and because of insufficient number of seizures and other reasons, he underwent a period of electroencephalogram examination in April. At this time, the electroencephalogram of the example manufacturer will save the data of Zhang San in the path of March and the path of April respectively, resulting in the dispersion of data storage. Therefore, the present application will move the files of the same patient in the later months to the earliest collection month, so that the files of a patient are gathered together.
[0047] S2, the electroencephalogram data organization structure of the patient.
[0048] In this embodiment, the organization structure of the electroencephalogram data of one patient after arrangement includes the following specific contents and concepts.
[0049] As shown in FIG. 3, the electroencephalogram file organization structure of patient Li Si is shown, and the present application is explained one by one from small to large.
[0050] Electroencephalogram data: "data.bdf" in FIG. 3: refers to the electroencephalogram data file saved by the electroencephalogram device through the collection operation on the patient's brain. Other brands include EEG.edf, EEG.TRC, EEG.eeg, etc. Format or name, for example, not limited to this.
[0051] Metadata of electroencephalogram data: is the data describing this electroencephalogram data. In the present application, it specifically includes data storage information, electroencephalogram collection process information, event label information, etc. Among them, the data storage information includes the storage path, number, folder name, etc. Information of the data; the electroencephalogram collection process information includes the name of the patient, the medical record number, the electroencephalogram number, the sampling rate, the number of channels, the time when the file collection starts, the duration, the number of the file in the data package, the folder name, etc. Information; the event label information includes the time information of the event and the content of the event, etc. In the example of FIG. 3, the metadata is composed of multiple.Json files and evt.bdf files. Other brands include EEG.mrk, patient.mdb, EEG.ng, etc. Files, or merged into electroencephalogram data files, such as EEG.TRC, EEG.edf, etc. For example, not limited to this.
[0052] EEG file unit package: the default saving form of EEG data, the smallest unit of complete EEG data, including a piece of EEG data and its metadata. EEG file unit package can exist independently and be read and played back by the original factory reading software. By default, continuously collected EEG data will be packaged into one EEG file unit package at a set interval (such as 1 hour). As shown in the example of FIG. 3, the folders named by natural numbers from "1" to "14" are EEG file unit packages. Other brands may use other naming rules or have no such level of organizational structure. This example is not limited thereto.
[0053] EEG file integration package: in the file storage scheme provided by some manufacturers, the EEG file unit packages saved by continuous collection will be placed in a folder, which is referred to as an EEG file integration package in the present application. Other brands may have no such level of organizational structure. This example is not limited thereto.
[0054] As shown in FIG. 3, Li Si's patient folder contains an EEG file integration package and two clip files. Clip: a routine operation in the clinical EEG workflow. Because clinical EEG is continuously collected, but the time of a single seizure may only be 5 to 10 minutes, opening a one-hour file package every time will waste time, so 5 to 10 minutes (or longer) of the seizure will be clipped to form an independent EEG file unit package. In order to distinguish, the following definitions are adopted in this embodiment:
[0055] Original file: EEG file unit package saved directly by EEG equipment;
[0056] Clip file: EEG file unit package saved by EEG reading software by selecting start time and end time for clipping operation from the original file. In the description of the application, when referring to EEG file unit package, it does not specifically refer to original file or clip file unless otherwise specified.
[0057] As shown in FIG. 3, the two folders with the "clip" suffix are clip files, which contain EEG data and metadata, so clip files also belong to EEG file unit packages. Other brands may use other naming rules. This example is not limited thereto.
[0058] For the present application, the EEG data of a patient after arrangement should contain at least one EEG file unit package to proceed to the following steps. Generally, there will be multiple EEG file unit packages and multiple clip files in a patient folder after arrangement.
[0059] S3, obtaining data storage information based on the metadata of EEG data, and generating a first file list.
[0060] In this embodiment, the metadata based on the electroencephalogram data generates a first file list, including: in the patient folder, traversing each electroencephalogram file unit package of the patient, confirming that it includes electroencephalogram data and metadata. As shown in FIG. 4, in the patient folder of patient Wangwu in this embodiment, there are a total of 12 electroencephalogram file unit packages, of which 10 are original files and 2 are cropped files. The electroencephalogram data and metadata under the electroencephalogram file unit package path can be searched and verified for existence. If they both exist, it is considered that the unit package is complete and valid, and its path is saved to the first file list, as shown in FIG. 4.
[0061] S4, based on the electroencephalogram data metadata, the electroencephalogram acquisition process information is obtained, and a second file list is generated.
[0062] In this embodiment, taking a certain brand of electroencephalogram data file as an example, the metadata of the electroencephalogram data is saved in a JSON file, and the information related to the electroencephalogram acquisition process in the metadata is read from the JSON file, as shown in FIG. 5. Each electroencephalogram file unit package corresponds to a row of information, which specifically includes the name of the patient, the medical record number, the electroencephalogram number, the sampling rate, the number of channels, the acquisition start time, the acquisition duration, the electroencephalogram unit package number, etc. of the collected patient. The second file list is generated through the above information.
[0063] Further, the example brand of electroencephalogram data includes files such as JsonVersion.json, RecordInfo.json, videoinfo.json, ExamInfo.json, datainfo.json, and other brands include files such as EEG.mrk, EEG.TRC, patient.mdb, EEG.ng, etc. Taking these as examples, but not limited thereto.
[0064] S5, based on the event tag information in the metadata of the electroencephalogram data, and based on the first file list and the second file list, a first event list to a third event list is generated.
[0065] In this embodiment, based on the event tag information in the metadata of the electroencephalogram data, and based on the first file list and the second file list, a first event list to a third event list is generated. The first event list includes path information of the electroencephalogram data, the second event list includes electroencephalogram acquisition process information, and the third event list includes event content and event time information. The specific implementation process is as follows:
[0066] S51, the event tag information is obtained from the metadata. In this embodiment, the event tag information is obtained by reading the metadata in each unit package, such as the evt.bdf file.
[0067] Further, the event tag information includes event content and event time.
[0068] Wherein, the event content is usually a string, when there is no event tag in a unit package, the event content is recorded as "NaN", indicating no event, and the relative time of the event is recorded as 0.
[0069] There are two ways to represent the time information in the event tag information, namely absolute time and relative time: the absolute time refers to the time of the event occurrence moment, which can be local time or Greenwich Mean Time; the relative time refers to the time difference between the event occurrence moment and the start time of the electroencephalogram file collection, usually in seconds; it should be noted that since the start time of the cropped file is different from that of the original file, the relative time of the same event tag in the original file and the cropped file is also different. For electroencephalogram reading software, using relative time is more conducive to displaying the position of the event tag, so most manufacturers default to save the time information of the event tag in relative time. As can be obtained from the electroencephalogram metadata of the example manufacturer, the event content, event number and event relative time of the event tag, based on these information, the third event list can be generated, as shown in FIG. 6.
[0070] In order to maintain consistent logical relationship, the embodiment refers to the list of saving data storage information as the first event list, the list of saving electroencephalogram collection process information as the second event list, and the list of saving event tag information as the third event list, and this order is only for clearer presentation of the role of the application, and does not have actual order significance. In particular, in this step, since all event tags need to be read to determine the number of rows of the event list, the third event list is generated first for the event list, and the first and second event lists are completed in the subsequent steps.
[0071] S52, generating the first and second event lists
[0072] At the same time of obtaining the event tag information, the data storage information and the electroencephalogram collection process information are integrated, specifically, as in the embodiment, after reading the evt.bdf file, the metadata files such as datainfo.json under the same path can be read, so as to obtain the data storage information and the electroencephalogram collection process information, and based on these information, the first and second event lists are generated. A unit package of electroencephalogram file may contain multiple event tags, and the data storage information and the electroencephalogram collection process information of the unit package only have one set; since the event list takes each event tag as a record row, in the event list, the contents in the first and second event list record rows of the event tags existing in the same unit package of electroencephalogram file are the same, as shown in FIG. 6.
[0073] S53, calculating the absolute time of the event.
[0074] In this embodiment, for each record line of the event label, the corresponding file collection start time has been obtained and saved in the second event list. In this embodiment, the collection start time information read from the datainfo.json file is in the format of Unix timestamp, which is converted into local time in the format of yyyyMMdd_HH:mm:ss; then the relative time is added to the collection start time through addition operation. The absolute time of the event, i.e. the actual time point of the event, is calculated and saved to the third event list, as shown in FIG. 6.
[0075] S54, the sorted data can be obtained.
[0076] In this embodiment, the "collection start time" is used as the key field for sorting, and the arrangement is from early to late. The specific time of the earliest collection of the patient is obtained, and the data time axis based on one patient is established through sorting, so that all the information of the electroencephalogram file unit package is arranged in time sequence.
[0077] S6, the event contents existing in the same electroencephalogram file unit package are de-duplicated to form an event summary, and a third file list is formed.
[0078] In this embodiment, the event list takes each event label as a record line, and the file list takes each electroencephalogram file unit package as a record line. When a certain electroencephalogram file unit package contains multiple event labels, the record lines of the two lists will be different, and it is necessary to convert the multiple event labels in the same electroencephalogram file unit package into one event content to make up for the difference in record lines. In order to fill more event content information into the file list with as low loss as possible, it is necessary to compress or summarize the event content information.
[0079] If there is no event marker in a EEG file unit package, the event content is "NaN", which means no event; or if there is only one event marker in a EEG file unit package, the EEG file unit package only occupies one record line in the event list, and there is no need to compress the event content, and the event summary is the same as the event content. If there are multiple event markers in a EEG file unit package, the event summary is generated by removing repeated strings. In this embodiment, as shown in FIG. 7, multiple "interictal discharge" event contents appear in the first EEG file unit package, and only one "interictal discharge" is finally retained by removing repeated strings. In addition, specific removal rules are set for common events to reduce excessive character removal. For example, in EEG acquisition, a seizure event often has three event markers "Pre", "seizure" and "end". By removing repeated strings, an intermediate result "Pre seizure end" is generated, and by setting the rule to recognize the result "Pre seizure end", the result can be replaced with "Pre seizure end" to generate a more explicit event summary.
[0080] S7, merging the first, second and third file lists to generate a main axis of the file list, and removing the record line of the clip file based on the identification of the clip file in the metadata to generate a branch of the file list.
[0081] In this embodiment, as shown in FIG. 8, in this embodiment, the folder name of the EEG file unit package of the clip file has a "clip" string as a suffix; other manufacturers may have other identifications. By identifying the clip file, the record line from the clip file in the merged file list is removed to generate another file list, i.e., a file list branch. The file list main axis and the file list branch both contain data storage information, acquisition process related information, event tag information and other metadata information. The file list main axis is from the record line of the original file, and the file list branch is from the record line of the clip file.
[0082] S8, merging the file list main axis and the file list branch.
[0083] In this embodiment, the file list takes each EEG file unit package as a record line, the event list takes each event tag as a record line, the file list displays the event summary, the event list displays the complete event tag content, the file list branch displays the derivative relationship between the original file and the clip file, and the event list displays the inheritance relationship of each event tag. In addition, each record line of the file list and the event list contains the path of the corresponding EEG file unit package and other metadata information.
[0084] In this embodiment, based on the metadata information in the file list main shaft and the file list branch, the record line of the clip file can be matched with the record line of the original file to determine the derivation relationship between the original file and the clip file. In this embodiment, as shown in FIG. 9, the matching of the clip file and the original file depends on the acquisition start time in the two record lines, wherein the acquisition start time and the acquisition duration of the original file can determine the time range of the acquisition, and the acquisition start time of the clip file must be within the range. According to this principle, all record lines in the file list branch can be matched. If some manufacturers set the original file information of the clip file in the metadata of the clip file, the matching can also be performed by reading the information. When the matching original file record line is found, the record line of the clip file is moved to the right side (branch part) of the same line to realize the merging of the file list main shaft and the file list branch. If the corresponding record line is not found, a new record line is established in the file list main shaft, and the record line of the clip file is still moved to the right side (branch part) of the new record line, and then the blank information in the new record line main shaft is supplemented by using the information of the clip file. The newly established record line can be concentrated at the end of the file list. After matching all record lines in the file list branch, reordering can be performed to sort the record lines according to the acquisition start time.
[0085] After the above steps, the complete file list is obtained, which is output and saved as the file list of the patient, as shown in FIG. 10. The left side is the file list main shaft, which is arranged in time sequence and contains metadata information such as data storage information, electroencephalogram acquisition process information and event label information. In particular, in this embodiment, the event label information is saved in the file list in the form of an event summary. The right side is the file list branch, which also contains the above-mentioned metadata information. The information in the branch is from the clip file, and the information in the main shaft is from the original file.
[0086] S9, merging the event list main shaft and the event list branch.
[0087] In this embodiment, based on the metadata information in the event list main shaft and the event list branch, the record line of the event label in the clip file can be matched with the record line of the event label in the original file to determine the inheritance relationship between the event label in the original file and the event label in the clip file. In this embodiment, as shown in FIG. 11, the record line of the event label in the clip file has a "clip" string as a suffix. The record line of the event label from the clip file in the merged event list is removed to generate another event list, i.e., the event list branch.
[0088] The matching of the event label in the clip file and the event label in the original file relies on the event absolute time and the event content in the two event label record lines, which should be completely consistent. As mentioned above, the event relative time of the same event label can be different, so it cannot be used for matching. The matching principle is shown in Figure 12. When the record line of the matching event label in the original file is found, the record line of the event label in the clip file is moved to the right side of the same line (the branch part), realizing the merging of the event list main shaft and the event list branch. If the corresponding record line is not found, a new record line is established in the event list main shaft, and the record line of the event label in the clip file is still moved to the right side of the new record line (the branch part), and then the blank information in the new record line main shaft is supplemented by using the information of the event label in the clip file. It should be particularly noted that the event relative time of the same event label can be different, and the recording start time of the electroencephalogram file is also different, which needs to be supplemented by the derivation relationship between the clip file and the original file in S8. Then, the relative time of the event label in the original file is calculated by using the absolute time of the event, and is supplemented in the new record line of the event list main shaft. The absolute time of the event and the content of the event are consistent in the main shaft and the branch. The new record line can be concentrated at the end of the list. After matching all the record lines in the event list branch, reordering can be performed by using the acquisition start time.
[0089] The above-mentioned step processes to obtain a complete event list, which is output and saved as the event list of the patient, as shown in Figure 13. The left side is the event list main shaft, which is arranged in time sequence and contains data storage information, electroencephalogram acquisition process information, event label information and other metadata information. In particular, in the embodiment, the event label information is saved in the event list in the form of event relative time, absolute time and event content. The right side is the event list branch, which also contains the above-mentioned metadata information. The information in the branch is from the clip file, and the information in the main shaft is from the original file. Further, if the information in the main shaft is supplemented by the branch, the record line will be identified. In the embodiment, the record line is identified by “reverse inheritance” in the original or clip column. It should be noted that the reverse inheritance aims to align the event information in the original file and the clip file, which is very important and guarantees the integrity of the information in the event list main shaft, laying a foundation for generating a complete file list and a data list.
[0090] S10, merging to generate a database file list or a database event list.
[0091] In this embodiment, the above steps are performed on each patient folder in a super directory containing multiple patient folders, and a file list and an event list can be generated for each patient. The file lists and event lists of different patients can be vertically combined and saved as a database file list or a database event list because they have the same column format, as shown in FIG. 14.
[0092] S11, generating a specific event file list based on the database file list.
[0093] In this embodiment, the database file list contains electroencephalogram file information of multiple patients and information of events occurred, and a specific event file list can be generated by identifying the content of a specific event and extracting the corresponding record line. As shown in FIG. 14, the record line with the event summary of "Pre-onset end" is selected, and the record lines of different patients that meet the condition are combined to form a specific event file list containing "onset events".
[0094] Further, the specific event file list realizes the retrieval of an electroencephalogram file unit package containing a specific event in a complete database, which is an important function realized by the present application. In the prior art, even for a single patient folder, the specific event cannot be screened, as shown in FIG. 1. Although the original manufacturer's electroencephalogram software lists the file path, it cannot provide the event summary of the file, so batch screening of data is not possible. However, through the present application, not only the specific event file screening of a patient is realized, but also the specific event file screening of multiple patients is realized. This function plays an important role in large batch data retrieval in scientific research. In this embodiment, the storage path information of each electroencephalogram file unit package is provided in the specific event file list, and the related electroencephalogram data can be read line by line through simple loop code, thereby realizing the function of batch data retrieval.
[0095] S12, writing the reversely inherited event label into the electroencephalogram metadata.
[0096] In this embodiment, the user can selectively perform this step, and after the above step is completed, only the reverse inheritance event label can be seen in the event list. If the reverse inheritance event label needs to be seen when viewing the original file in the original reading software, the following steps need to be performed: according to the completed information, an evt.bdf file (for example, evt.bdf for the example manufacturer, and other manufacturers may be EEG.mrk or other files that save event information) can be generated. According to the user's selection, the original data evt.bdf file is replaced, and after replacement, the original electroencephalogram reading software is opened, and the event mark from the cropped file can be seen. The present application designs two related lists, namely the file list and the event list. One important reason is that the event summary in the file list may cause a certain degree of information loss, so the present application designs a matching event list to supplement and display complete event information.
[0097] S13, saving and outputting of the patient file list and the event list, the database file list and the event list, and the specific event file list or the event list.
[0098] The patient file list and the event list, the database file list and the event list, and the specific event file list or the event list generated after the above steps are completed can be saved as an Excel file or a.mat file in Matlab, which is convenient for later review and editing.
[0099] In a preferred embodiment of the present application, due to the problem that different manufacturers' electroencephalogram devices are not compatible with each other, a step of pre-formatting the electroencephalogram data is further included. The specific process is as follows: reading the electroencephalogram data and its attached metadata, generating a new file according to a unified format, and if some information is missing, a certain degree of filling is performed, for example, the unified format is to save the electroencephalogram file into bdf format and the metadata into json format.
[0100] Further, the data format unification can adopt a function of EEGlab in Matlab to read files of multiple manufacturers and save them into a unified format. This is an example, not limited thereto.
[0101] In a preferred embodiment of the present application, the processing and integration of electroencephalogram metadata are completed through the above steps. Although the storage location of the original data is arranged to a certain extent, the data structure is not damaged, so that the original electroencephalogram software can be accessed as before. In this preferred embodiment, the arranged database can be accessed by two groups of personnel. One is the clinical staff. Since all the data are reassembled by patient names, the case access in clinical work is more convenient, and doctors can conveniently access and manage the electroencephalogram data of individual patients. The other is the scientific research staff. For large model data analysis and research, batch data access is required. Through the above steps, the database file list or specific event file list can be quickly selected to obtain the required seizure period, stimulation period, task period, resting period, etc. Using the data path information in the list, batch scripts can be automatically run, which saves the time and economic cost of traditional data copying one by one, and facilitates large-scale data analysis and research.
[0102] In a preferred embodiment of the present application, by setting a specific acquisition start time, such as night or early morning, the electroencephalogram file list of the same acquisition time of different patients can be obtained and output. This list can be used for batch electroencephalogram data reading in scientific research of circadian rhythm electroencephalogram changes.
[0103] In a preferred embodiment of the present application, by setting a specific acquisition duration, the electroencephalogram file list of long-term continuous acquisition can be obtained and output. This list can be used for electroencephalogram data reading of long-term electroencephalogram changes in scientific research.
[0104] In summary, compared with the file list presented by the prior art, the present application provides event content information in the form of abstract, which is the key to give the file list a new screening function. However, the event content information cannot be achieved by simply reading the event tag data, but must go through the three key steps provided by the present application: 1, gathering files of the same patient, 2, reverse inheritance of event tags, 3, generation of event abstract. The lack of the first two steps will result in incomplete event content information, and the lack of the third step will result in too much event content to be displayed normally. Among them, the reverse inheritance of event tags is a tricky problem, which requires seeing the event tag content established in the cropped file in the original file. The principle of this requirement is very similar to "carving a boat to seek a sword". The long duration of the original electroencephalogram file is like a long river, and the cropped file is like a boat in the river. The sword falling into the water is an event, and establishing an event tag in the cropped file is like marking on the boat. Without a set of logical file management system, it is impossible to locate the position of the sword; however, the metadata processing method constructed by the present application establishes a clear logic, which solves this difficult problem by first establishing the derivation relationship between the original file and the cropped file (open the boat back to the original place), and then finding the position of the event tag according to the absolute time of the event (get the sword from the water from the mark).
[0105] Embodiment two: the above embodiment one provides a clinical electroencephalogram data reading method, and correspondingly, the present embodiment provides a clinical electroencephalogram data arrangement device. The device provided by the present embodiment can implement the clinical electroencephalogram data reading method of embodiment one. The device can be realized by software, hardware or a combination of software and hardware. For the convenience of description, the device is described as various units in the description. Of course, in the implementation, the functions of the units can be realized in the same or multiple software and / or hardware. For example, the device can include integrated or separate functional modules or functional units to perform the corresponding steps in the methods of embodiment one. Since the device of the present embodiment is basically similar to the method embodiment, the description process of the present embodiment is relatively simple, and the related parts can be referred to the part of the description of embodiment one. The embodiment of the clinical electroencephalogram data arrangement device based on the time axis and branch management logic provided by the present application is only illustrative.
[0106] Specifically, the clinical electroencephalogram data arrangement device provided by the present embodiment comprises:
[0107] A path generation unit configured to arrange the electroencephalogram data of the same patient scattered in different paths into a set same path to form the path of the electroencephalogram data of the patient, wherein the electroencephalogram data comprises original files and cropped files;
[0108] The list generation unit is configured to obtain data storage information based on metadata of electroencephalogram data, generate a first file list, wherein the first file list includes path information where the electroencephalogram data is located; obtain electroencephalogram acquisition process information based on metadata of the electroencephalogram data, generate a second file list; obtain event label information based on metadata of the electroencephalogram data, and generate a first event list, a second event list and a third event list based on the first file list and the second file list, wherein the first event list includes path information where the electroencephalogram data is located, the second event list includes the electroencephalogram acquisition process information, and the third event list includes event content and event time information; remove the same event content existing in the same electroencephalogram file unit package in the third event list to form event summary information, and form a third file list, wherein the third file list includes the event summary information; merge the first file list, the second file list and the third file list to obtain a file list main shaft; merge the first event list, the second event list and the third event list to obtain an event list main shaft; and based on metadata of the electroencephalogram data, identify record lines from cropped files in the file list main shaft and the event list main shaft, and move them to a file list branch and an event list branch respectively; for each record line in the file list branch, match a record line in the file list main shaft according to the acquisition start time of the record line in the file list branch, and move the record line in the file list branch to the right of the same line of the record line in the file list main shaft, to represent the derivative relationship between the original file and the cropped file; for each record line in the event list branch, match a record line in the event list main shaft according to the absolute time of the event of the record line in the event list branch, and move the record line in the event list branch to the right of the same line of the record line in the event list main shaft, to clearly show the inheritance relationship between the event label in the original file and the event label in the cropped file; if there is no corresponding record line in the main shaft, a new record line is established in the main shaft, and the record line in the branch is still moved to the right of the same line of the record line in the main shaft, and the label information is created according to the event label information in the cropped file, to realize the reverse inheritance of the event label information from the cropped file to the original file, wherein the event list main shaft is a record line from the original file, and the event list branch is a record line from the cropped file; based on the metadata information, the record line of the cropped file can be matched with the record line of the original file, to clearly show the inheritance relationship between the event label in the original file and the event label in the cropped file, if an event label is labeled in the original file, and the acquisition time of the cropped file contains the event, the event label will be inherited to the cropped file; at this time, the event absolute time and the event content of the event label in the two places are consistent; because the acquisition start time of the cropped file is usually different from the acquisition start time of the original file, the relative time of the event label in the two places is different, the event label in the cropped file is matched with the event label in the original file by using the consistent rule of the absolute time and the content, to clearly show the inheritance relationship between the two.If the original file is cropped first to generate a cropped file, and then the event label is labeled in the cropped file, the corresponding event label will be missing in the original file, resulting in a missing corresponding record line in the event list main axis; by traversing each record line of the event list branch, these unmatched record lines can be found; a new record line is established in the event list main axis to match them; the information in the newly created record line in the main axis can be completed using the existing event label information, and it is noted that this record line is inherited from the event label in the cropped file; the event list branch and the event list main axis are matched to form a complete event list of the patient and output;
[0109] The specific process of generating the first event list, the second event list and the third event list is: merging the first file list, the second file list and the third file list to obtain a file list main axis; merging the first event list, the second event list and the third event list to obtain an event list main axis; and identifying the record lines from the cropped file in the file list main axis and the event list main axis based on the metadata of the electroencephalogram data, moving them to the file list branch and the event list branch respectively, including: the metadata of each electroencephalogram file unit package has an identifier identifying the unit package as an original file or a cropped file, and the record lines from the cropped file in the two lists are separated by identifying the identifier; the record lines in the main axis and the branch include information in the first list, the second list and the third list;
[0110] For each record line in the file list branch, match the record line in the file list main axis according to its acquisition start time, and move the branch record line to the right side of the same line of the main axis record line to represent the derivative relationship in the original file and the cropped file, including: the file list main axis is all record lines from the original file, and the file list branch is all record lines from the cropped file; based on the metadata information, the record lines of the cropped file can be matched with the record lines of the original file to clearly show the derivative relationship in the original file and the cropped file; the acquisition start time of the cropped file should be within the acquisition start time to the end time of the corresponding original file, and the derivative relationship in the original file and the cropped file is determined by time comparison; or, some manufacturers record the information of the original file in the metadata of the cropped file when generating the cropped file, and directly read this relationship; the file list branch and the file list main axis are matched to form a complete file list of the patient and output;
[0111] The list output unit is configured to combine the file list main shaft and the file list branch to obtain a final file list of a patient and output; combine the event list main shaft and the event list branch to obtain a final event list of a patient and output; combine the file lists or the event lists of a plurality of patients to obtain a database file list or a database event list and output; and extract a record line of specific event content from the database file list according to a specific event keyword set by a user, and combine to obtain a specific event file list and output.
[0112] In a preferred embodiment of the present application, the list generation unit comprises a time axis processing module and a branch management module; the time axis processing module: taking the time axis as the core, the electroencephalogram data of the patient at different time periods and devices is uniformly arranged and managed, all the electroencephalogram data is sorted and arranged according to time to establish a clear time sequence, each event has an absolute time stamp, ensuring that all data and events can be accurately arranged and managed according to the time axis, and this function is the basis of the system based on time axis management. The branch management module: based on the time axis, the electroencephalogram data is cut and marked, based on the branch, the logical relationship between the cut file and the original file can be quickly understood, the situation before and after the event in the cut file is facilitated to be combed, and the reverse inheritance function can be realized. The cut file is a branch of the time axis, facilitating the doctor to mark and review the onset time and important events of the patient.
[0113] In a preferred embodiment of the present application, the data security module is adopted to isolate from the Internet, form a secure internal database, ensure the safety and privacy protection of the patient data, and reduce the security cost.
[0114] In a preferred embodiment of the present application, the data display unit is adopted to display the data by using a plurality of information display methods, including: abstract display: taking each folder as a unit, displaying one piece of condensed information on each line, abstractly displaying all events in the folder, and generating a character string output. Detailed display: taking each event as a unit, displaying more comprehensive information, each piece of information is linked to the corresponding database position, each event label has a file path, the original file of the database can be called through the file path, thereby realizing batch and purposeful file calling, which is very important in scientific research.
[0115] In a preferred embodiment of the present application, the data format conversion module can automatically identify and convert the electroencephalogram data formats of different devices, and ensure that the data can be uniformly arranged.
[0116] In a preferred embodiment of the present application, the event marking unit, the management unit and the absolute time synchronization unit comprise:
[0117] Event marking unit: On the bedside EEG machine, the patient, family member or caregiver can press a button to mark on the EEG, these marks are recorded on paper, and the next day the doctor reviews the EEG video and records according to the time point, and makes accurate annotations.
[0118] Event management unit: The doctor will mark the EEG changes, onset time point and end time point, etc. These annotations generate a special file, which is stored in the EEG record folder corresponding to the time period.
[0119] Absolute time synchronization unit: Each event has an absolute timestamp, ensuring that all data and events can be accurately arranged and managed on the timeline.
[0120] In a preferred embodiment of the present application, the folder naming rule: all individual one-hour EEG data are named as "name + collection start time", which is convenient for searching and managing. The JSON file description: each folder contains a JSON file, which details the length of the data, collection information (such as the number of electrode channels) and the patient's personal information.
[0121] Embodiment three: the present embodiment provides an electronic device corresponding to the clinical EEG data reading method provided in embodiment one, which can be an electronic device for a client, such as a mobile phone, a notebook computer, a tablet computer, a desktop computer, etc., to execute the method of embodiment one.
[0122] Embodiment four: the present embodiment provides a computer-readable storage medium storing one or more programs, the one or more programs including computer instructions that, when executed by a computer, cause the computer to perform the method provided in embodiment one.
[0123] Cross-reference of related applications
[0124] This application claims priority to Chinese patent application (application number: 202411230330.X) with a filing date of September 4, 2024, the entire contents of which are hereby incorporated by reference. Industrial applicability
[0125] The present application can be widely applied in EEG data management, mainly applied in clinical hospitals, helping doctors to more efficiently manage and review EEG data, and improving the accuracy and efficiency of diagnosis and treatment; at the same time, it can also be applied in scientific research, so that researchers can batch review and analyze data, and promote the development of EEG related research.
[0126] It should be pointed out finally that the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit the same; and although the present application has been described in detail with reference to the foregoing embodiments, it should be appreciated by those skilled in the art that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features thereof can be replaced equivalently; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method of reading clinical electroencephalogram data, characterized by, The method comprises: All electroencephalogram data of the same patient dispersed in different paths are sorted into the same path set to form a path of the electroencephalogram data of the patient, wherein the electroencephalogram data comprises original files and cropped files; Data storage information is obtained based on metadata of the electroencephalogram data to generate a first file list, wherein the first file list comprises path information where the electroencephalogram data is located; Electroencephalogram acquisition process information is obtained based on the metadata of the electroencephalogram data to generate a second file list; Event tag information is obtained based on the metadata of the electroencephalogram data, and a first event list, a second event list and a third event list are generated based on the first file list and the second file list, wherein the first event list comprises path information where the electroencephalogram data is located, the second event list comprises electroencephalogram acquisition process information, and the third event list comprises event content and event time information, wherein the specific process of the first event list, the second event list and the third event list is that the event tag information contains the time and content of the event tag, a record line is established for each event tag to save the absolute time, relative time and event content of the event; the third event list comprises the time and content of all event tags of the patient; for each record line in the third event list, the corresponding first event list information, i.e. the data storage information, and the second event list information, i.e. the electroencephalogram acquisition process information, are supplemented; if a single electroencephalogram file unit package contains multiple events, the data storage information and the electroencephalogram acquisition process information of the record lines of these event tags are the same; Event summary information is formed by removing the same event content existing in the same electroencephalogram file unit package in the third event list to generate a third file list, wherein the third file list comprises the event summary information; The first file list, the second file list and the third file list are merged to obtain a file list main shaft, the first event list, the second event list and the third event list are merged to obtain an event list main shaft, and the record lines from the cropped files in the file list main shaft and the event list main shaft are identified based on the metadata of the electroencephalogram data, and they are moved to a file list branch and an event list branch, respectively, comprising: the metadata of each electroencephalogram file unit package has an identifier identifying whether the unit package is an original file or a cropped file, and the record lines from the cropped files in the two lists are separated by identifying the identifier; the record lines in the main shaft and the branch comprise information in the first list, the second list and the third list. For each record line in the file list branch, according to its acquisition start time, the record line in the file list main shaft is matched, and the branch record line is moved to the right side of the same line of the main shaft record line to represent the derivative relationship in the original file and the cropped file, including: the file list main shaft is all the record lines from the original file, and the file list branch is all the record lines from the cropped file; based on the metadata information, the record line of the cropped file can be matched with the record line of the original file to clearly show the derivative relationship in the original file and the cropped file; the acquisition start time of the cropped file should be within the acquisition start time to the end time of the corresponding original file, and the derivative relationship in the original file and the cropped file is determined through time comparison; or some manufacturers record the information of the original file in the metadata of the cropped file when generating the cropped file, and directly read this relationship, and the file list branch and the file list main shaft are matched to form a complete file list of the patient and output. For each record row in the event list branch, according to the absolute time of its event, the record row in the event list main shaft is matched, and the branch record row is moved to the right of the same row of the main shaft record row to clarify the inheritance relationship of the event label in the original file and the event label in the clipping file; if there is no corresponding record row in the main shaft, a new record row is established in the main shaft, and the branch record row is still moved to the right of the same row of the main shaft record row, and the label information is created according to the current branch record row, that is, the event label information in the clipping file, to realize the reverse inheritance of the event label information from the clipping file to the original file; wherein the event list main shaft is a record row from the original file, and the event list branch is a record row from the clipping file; based on the metadata information, the record row of the clipping file can be matched with the record row of the original file to clarify the inheritance relationship of the event label in the original file and the event label in the clipping file; if an event label is labeled in the original file, and the clipping time of the clipping file contains this event, then this event label will be inherited to the clipping file; at this time, the event absolute time and event content of the event label in the two places are consistent; because the clipping start time of the clipping file is usually different from the clipping start time of the original file, the relative time of the event label in the two places is different, and the event label in the clipping file is matched with the event label in the original file by using the consistent rule of absolute time and content to clarify the inheritance relationship of the two; if the original file is clipped first to generate a clipping file, and then the event label is labeled in the clipping file, the corresponding event label will be missing in the original file, resulting in the lack of corresponding record rows in the event list main shaft; by traversing each record row of the event list branch, these unmatched record rows can be found; new record rows are established in the event list main shaft to match them; the information in the newly established record rows in the main shaft can be completed by using the existing event label information, and it is noted that the record row is reversely inherited from the event label in the clipping file; the event list branch and the event list main shaft are matched to form a complete event list of the patient and are output; The file list main shaft and the file list branch are merged to obtain the final file list and are output; The event list main shaft and the event list branch are merged to obtain the final event list and are output.
2. The method of reading clinical electroencephalographic data according to claim 1, wherein, It also includes the step of gathering all electroencephalogram data of the same patient into a folder based on patient information, and the specific process is as follows: all electroencephalogram data of the same patient are moved and stored in a folder named after the patient, including original files and clipping files; the patient's earliest clipping time is used as a reference, and the patient's folder is stored in the month folder corresponding to this time.
3. The method of reading clinical electroencephalographic data of claim 1, wherein, Based on the metadata of the electroencephalogram data, data storage information is obtained to generate a first file list, including: The data storage information refers to the storage path and folder name information of the data; in the patient folder, each electroencephalogram data unit package of the patient is traversed to confirm that it includes electroencephalogram data and metadata, and the path of these electroencephalogram data unit packages is saved to the first file list.
4. The method of claim 1, wherein, The metadata based on the electroencephalogram data is used to acquire the electroencephalogram acquisition process information, and a second file list is generated, specifically as follows: The electroencephalogram acquisition process information includes the name of the collected patient, the medical record number, the electroencephalogram number, the sampling rate, the number of channels, the time when the file acquisition starts, the duration, and the number information of the electroencephalogram data unit package; in the patient folder, each electroencephalogram data unit package of the patient is traversed to acquire the electroencephalogram acquisition process information to form a second file list; the second file list includes the name of the collected patient, the medical record number, the electroencephalogram number, the sampling rate, the number of channels, the time when the file acquisition starts, the duration, and the number information of the electroencephalogram data unit package.
5. The method of reading clinical electroencephalographic data of claim 1, wherein, The same event content existing in the same electroencephalogram file unit package in the third event list is removed to form event summary information, and a third file list is formed, specifically as follows: The third event list includes the event content of each event label, and the event content of the multiple event labels occurring in one electroencephalogram file unit package is converted into a string, and a method of removing duplicate strings is used to generate the event summary; if there is no event label in one electroencephalogram file unit package, the event summary "NaN" is generated, indicating no event; when there are three event labels "Pre", "seizure" and "end" in one seizure, the event summary "Pre seizure end" is generated by string recognition and selectively retaining key characters; the generated event summary is saved in the third file list, so that the third file list contains the event summary of each electroencephalogram file unit package.
6. The method of reading clinical electroencephalographic data of claim 1, wherein, The file list or the event list of multiple patients is also longitudinally merged to obtain an electroencephalogram database file list and an electroencephalogram database event list, and the step of outputting and saving is further included, specifically as follows: Since the column contents of the lists of different patients are consistent, the lists of multiple patients are longitudinally merged to form an electroencephalogram database file list and an electroencephalogram database event list containing the electroencephalogram metadata information of multiple patients.
7. The method of reading clinical electroencephalographic data of claim 1, wherein, The electroencephalogram database file list is also screened for specific event summaries to obtain a specific event file list for output, wherein the specific event is scattered or continuous, specifically as follows: By setting a specific event summary, when the set event summary is "seizure", a file list containing all seizure events in the entire electroencephalogram database is obtained and output, wherein the file list also contains the path information of each electroencephalogram file unit package, and this list can be used to batch read the electroencephalogram data containing the seizure event.
8. A clinical electroencephalogram data reading device, characterized by, The device includes: A path generation unit configured to arrange the electroencephalogram data of the same patient scattered in different paths into a set same path to form a path of the electroencephalogram data of the patient, wherein the electroencephalogram data includes original files and cropped files; The list generating unit is configured to obtain data storage information based on metadata of electroencephalogram data, generate a first file list, wherein the first file list includes path information where the electroencephalogram data is located; obtain electroencephalogram acquisition process information based on metadata of the electroencephalogram data, generate a second file list; obtain event label information based on metadata of the electroencephalogram data, and generate a first event list, a second event list and a third event list based on the first file list and the second file list, wherein the first event list includes path information where the electroencephalogram data is located, the second event list includes the electroencephalogram acquisition process information, and the third event list includes event content and event time information; remove the same event content existing in the same electroencephalogram file unit package in the third event list to form event summary information, and form a third file list, wherein the third file list includes the event summary information; merge the first file list, the second file list and the third file list to obtain a file list main shaft; merge the first event list, the second event list and the third event list to obtain an event list main shaft; and identify record lines from cropped files in the file list main shaft and the event list main shaft based on metadata of the electroencephalogram data, and move them to a file list branch and an event list branch respectively; for each record line in the file list branch, match a record line in the file list main shaft according to the acquisition start time thereof, and move the branch record line to the right side of the same line of the main shaft record line to represent the derivative relationship in the original file and the cropped file; for each record line in the event list branch, match a record line in the event list main shaft according to the absolute time of the event thereof, and move the branch record line to the right side of the same line of the main shaft record line to clearly show the inheritance relationship of the event label in the original file and the event label in the cropped file; if there is no corresponding record line in the main shaft, a new record line is established in the main shaft, the branch record line is still moved to the right side of the same line of the main shaft record line, and label information is created according to the event label information in the current branch record line, namely the event label information in the cropped file, to realize reverse inheritance of the event label information from the cropped file to the original file, wherein the event list main shaft is a record line from the original file, and the event list branch is a record line from the cropped file; based on the metadata information, the record line of the cropped file can be matched with the record line of the original file to clearly show the inheritance relationship of the event label in the original file and the event label in the cropped file, if an event label is labeled in the original file, the acquisition time of the cropped file contains the event, and the event label is inherited to the cropped file; at this time, the event absolute time and the event content of the event label in the two places are consistent; because the acquisition start time of the cropped file is usually different from the acquisition start time of the original file, the relative time of the event label in the two places is different, the event label in the cropped file is matched with the event label in the original file by using the consistent rule of the absolute time and the content, to clearly show the inheritance relationship of the two.If the original file is cropped first to generate a cropped file, and then the event label is marked in the cropped file, the corresponding event label will be missing in the original file, resulting in a lack of corresponding record lines in the event list main axis; By traversing each record line of the event list branch, these unmatched record lines can be found; A new record line is established in the event list main axis to match them; The information in the newly created record line in the main axis can be completed using the existing event label information, and it is noted that the record line is inherited from the event label in the cropped file. The event list branch and the event list main axis are matched to form a complete event list of the patient and output. The specific process of generating the first event list, the second event list and the third event list is: merging the first file list, the second file list and the third file list to obtain a file list main shaft; merging the first event list, the second event list and the third event list to obtain an event list main shaft; and identifying the record lines from the cropped files in the file list main shaft and the event list main shaft based on the metadata of the electroencephalogram data, and moving them to a file list branch and an event list branch, respectively, including: the metadata of each electroencephalogram file unit package has an identifier identifying the unit package as an original file or a cropped file, and the record lines from the cropped files in the two lists are separated by identifying the identifier; the record lines in the main shaft and the branch include the information in the first list, the second list and the third list; For each record line in the file list branch, the record line in the file list main shaft is matched according to the acquisition start time, and the branch record line is moved to the right side of the same line of the main shaft record line to represent the derivative relationship in the original file and the cropped file, including: the file list main shaft is all record lines from original files, and the file list branch is all record lines from cropped files; based on the metadata information, the record lines of the cropped files can be matched with the record lines of the original files to clearly show the derivative relationship in the original file and the cropped file; the acquisition start time of the cropped file should be within the acquisition start time to the end time of the corresponding original file, and the derivative relationship in the original file and the cropped file is determined by time comparison; or some manufacturers record the information of the original file in the metadata of the cropped file when generating the cropped file, and directly read the relationship, and the file list branch and the file list main shaft are matched to form a complete file list of the patient and output; The list output unit is configured to merge the file list main shaft and the file list branch to obtain the final file list of a patient and output; merge the event list main shaft and the event list branch to obtain the final event list of a patient and output; merge the file lists or event lists of multiple patients to obtain a database file list or a database event list and output; and extract the record lines of specific event content from the database file list according to the specific event keywords set by the user, and merge to obtain a specific event file list and output.
9. An electronic device, comprising: It comprises: at least one processor; and a memory connected in communication with the processor; wherein the memory stores instructions executable by the processor, and the instructions are executed by the processor to enable the processor to perform the method according to any one of claims 1-7.
10. A computer-readable storage medium storing one or more programs, the one or more programs comprising instructions for: The one or more programs include computer instructions for causing a computer to perform the method according to any one of claims 1-7.
Citation Information
Patent Citations
Method and device for hierarchically storing medical image information, computer device and medium
CN110782973A
Medical data management method, electronic equipment and storage medium
CN116936013A
Event searching method and device based on hospital clinical big data
CN117271903A
Clinical electroencephalogram data reading method, device, equipment and medium
CN118733539A
Deep learning medical systems and methods for medical procedures
US20180144465A1