A method, device, equipment and medium for reading clinical electroencephalogram data

通过整合和管理临床脑电图数据,利用元数据识别文件和事件列表的方法,解决了不同时间和设备上的数据管理效率低下问题,实现了高效的数据管理和批量分析能力。

CN118733539BActive Publication Date: 2024-11-22XUANWU HOSPITAL OF CAPITAL UNIV OF MEDICAL SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411230330.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-04
Publication Date
2024-11-22
Estimated Expiration
2044-09-04

AI Technical Summary

Technical Problem

The management efficiency of clinical EEG data at different times and devices is inefficient, and cannot be viewed and interpreted in a unified manner, and the equipment of different manufacturers is incompatible, resulting in inefficient data presentation and management.

Method used

By integrating the EEG data of the same patient, a file list and event list are generated, metadata is used to identify the relationship between the original file and the cropped file, reverse inheritance of event tags and event summary generation, and integrated file and event list are formed , improve data tunability and management efficiency.

Benefits of technology

It realizes unified management of EEG data on patients' different time periods and devices, improves the tunability and management efficiency of data, ensures the integrity of event tags and the accuracy of data, and supports batch analysis and scientific research. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733539B_ABST
    Figure CN118733539B_ABST
Patent Text Reader

Abstract

The present invention discloses a clinical EEG data reading method, device, equipment and medium, including: gathering EEG files of the same patient into the same path; based on the metadata of the patient's EEG data, obtaining data storage information, EEG 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 other methods; based on the metadata, the record lines from the cropped files in the two lists are moved to the list branches, and the record lines in the branches are matched with the main axis according to the acquisition time or event time; merging the main axis and the branch to generate the patient's file list and event list for output; merging the lists of multiple patients to generate the file list and event list of the database for output; screening the event summary to generate a specific event file list for output. The present invention can improve the accessibility and management efficiency of data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a clinical electroencephalogram (EEG) data reading method, device, equipment and medium, and relates to the field of EEG data presentation. Background Art

[0002] In clinical hospitals, EEG examination is essential for the diagnosis and treatment of neurological diseases such as epilepsy. Figure 1 As shown in the figure, although the manufacturer's software provides a file list for staff to review and manage data, the list cannot display the events that occurred in this EEG file. The content of the event label can only be viewed by opening the file. Sometimes when clinical staff need to move and copy files through the folder system (file browser) and other file management operations, they cannot know the events that occurred in each EEG file.

[0003] In addition, patients’ EEG examinations during medical treatment are often intermittent, and the examination data from different times and different devices cannot be uniformly viewed and managed, making it impossible to efficiently explain the patient’s examination results. Moreover, since EEG devices from different manufacturers are incompatible with each other, they cannot be uniformly reviewed. All these reasons lead to inefficient presentation and management of EEG data. Summary of the invention

[0004] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, in view of the above problems, the purpose of the present invention is to provide a clinical EEG data reading method, device, equipment and medium, which can integrate the EEG data of the same patient, provide a file list that can display event content information and file paths, and help staff improve data accessibility and management efficiency.

[0005] In order to achieve the purpose of the invention, the technical solution provided by the present invention is:

[0006] In a first aspect, the present invention further provides a method for collating clinical EEG data, the method comprising:

[0007] Arrange all EEG data of the same patient scattered in different paths into a set same path to form a path of the EEG data of the patient, wherein the EEG data includes an original file and a cropped file;

[0008] Acquire data storage information based on metadata of the EEG data, and generate a first file list, wherein the first file list includes path information where the EEG data is located;

[0009] Acquiring EEG acquisition process information based on metadata of the EEG data, and generating a second file list;

[0010] Acquire event tag information based on metadata of the EEG data, and generate first to third event lists based on the first file list and the second file list, wherein the first event list includes path information of the EEG data, the second event list includes EEG acquisition process information, and the third event list includes event content and event time information;

[0011] Deduplication of identical event contents occurring in the same electroencephalogram file unit package in the third event list is performed to form event summary information, thereby forming a third file list, wherein the third file list includes the event summary information;

[0012] Merge the first file list to the third file list to obtain a file list main axis; merge the first event list to the third event list to obtain an event list main axis; and identify 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, and move them to the file list branch and the event list branch respectively;

[0013] 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 of the same line of the main axis record line to indicate the derivative relationship between the original file and the trimmed file;

[0014] For each record line in the event list branch, match the record line in the event list main axis according to the absolute time of its event, and move the branch record line to the right of the same line of the main axis record line to clarify the inheritance relationship between the event label in the original file and the event label in the trimmed file; if there is no corresponding record line in the main axis, create a new record line in the main axis, still move the branch record line to the right of the same line of the main axis record line, and create label information according to the event label information in the current branch record line, that is, the trimmed file, to achieve reverse inheritance of event label information from the trimmed file to the original file;

[0015] Merge the file list main axis with the file list branch to obtain the final file list for output;

[0016] Merge the event list main axis with the event list branch to obtain the final event list for output.

[0017] Some possible implementations also include a step of aggregating all EEG data of the same patient into a folder based on the patient information. The specific process is: all EEG data of the same patient are moved and stored in a folder named after the patient, including original files and cropped files. The patient's earliest collection time is used as the basis, and the patient folder is stored in the month folder corresponding to this time.

[0018] In some possible implementations, acquiring data storage information based on metadata of the electroencephalogram data and generating a first file list includes:

[0019] The data storage information refers to the storage path and folder name information of the data; in the patient folder, each EEG data unit package of the patient is traversed to confirm that it includes EEG data and metadata, and the paths of these EEG data unit packages are saved in the first file list.

[0020] In some possible implementations, the EEG acquisition process information is obtained based on the metadata of the EEG data to generate a second file list, specifically:

[0021] The EEG acquisition process information includes the patient's name, medical record number, EEG number, sampling rate, number of channels, the start time of the file acquisition, duration, and number information of the EEG data unit package; in the patient folder, traverse each EEG data unit package of the patient to obtain the EEG acquisition process information to form a second file list; the second file list includes the patient's name, medical record number, EEG number, sampling rate, number of channels, the start time of the file acquisition, duration, and number of the EEG data unit package.

[0022] In some possible implementations, event label information is obtained based on metadata of the electroencephalogram data, and first to third event lists are generated based on the first file list and the second file list, specifically:

[0023] The event tag information includes the time and content of the event tag. A record line is created for each event tag to save the absolute time, relative time and event content of the event. The third event list includes the time and content of all event tags of the patient.

[0024] For each record row in the third event list, the corresponding first event list information, i.e., data storage information, and second event list information, i.e., EEG acquisition process information, are supplemented; if an EEG file unit package contains multiple events, the data storage information and EEG acquisition process information of the record rows of these event labels are the same.

[0025] In some possible implementations, the same event content occurring in the same electroencephalogram file unit package in the third event list is deduplicated to form event summary information, thereby forming a third file list, specifically:

[0026] The third event list includes the event content of each event label. Based on the event content of multiple event labels occurring in an EEG file unit package, the event content is converted into a character string, and the event summary is generated by removing repeated character strings. If there is no event label in an EEG file unit package, an event summary "NaN" is generated, indicating no event. For common situations, such as an attack having three event tags "Pre", "Attack" and "end", through string recognition, key characters are selectively retained to generate an event summary of "Pre Attack End". The generated event summary is saved in the third file list, so that the third file list contains the event summary of each EEG file unit package.

[0027] In some possible implementations, the first file list to the third file list are merged to obtain a file list main axis; the first event list to the third event list are merged to obtain an event list main axis; and the record lines from the cropped files in the two lists are identified based on the metadata of the electroencephalogram data, and they are moved to the file list branch and the event list branch respectively, including:

[0028] The metadata of each EEG file unit package has an identifier that indicates 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 this identifier; the record lines of the main axis and the branch both include the information in the first to third lists.

[0029] Some possible implementations include matching each record line in the file list branch with the record line in the file list main axis according to its acquisition start time, and moving the branch record line to the right of the same line of the main axis record line to indicate the derivative relationship between the original file and the trimmed file, including:

[0030] The main axis of the file list is all record lines from the original file, and the branches of the file list are 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 clarify the derivative relationship between the original file and the cropped file; the start time of the acquisition of the cropped file should be within the range of the acquisition start time to the end time of the corresponding original file, and the derivative relationship between the original file and the cropped file can be determined by time comparison; some manufacturers record the information of the original file in the metadata of the cropped file when generating the cropped file, and this relationship can also be read directly, and the file list branch is matched with the main axis of the file list to synthesize a complete file list for the patient for output.

[0031] In some possible implementations, the main axes of the event list are all record lines from the original file, and the branches of the event list are 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 clarify the inheritance relationship between the event tags in the original file and the event tags in the cropped file. If an event tag is marked in the original file, if the acquisition time of the cropped file includes this event, then this event tag will be inherited to the cropped file; at this time, the event absolute time and event content of the event tags in the two places are consistent; and because the acquisition start time of the cropped file is usually different from the acquisition start time of the original file, resulting in different relative times of the event tags in the two places, the event tags in the cropped file are matched with the event tags in the original file using the consistent rules of absolute time and content to clarify the inheritance relationship between the two;

[0032] If the original file is first cropped to generate a cropped file, and then the event labels are marked in the cropped file, the corresponding event labels will be missing in the original file, resulting in a lack of corresponding record rows in the event list main axis; by traversing each record row of the event list branch, these unmatched record rows can be found; new record rows are created for them in the event list main axis to match the two; the existing event label information can be used to complete the information in the newly created record row in the main axis, and it is noted that the record row is reversely inherited from the event label in the cropped file, and the event list branch is matched with the event list main axis to synthesize a complete event list for the patient for output.

[0033] Some possible implementations further include vertically merging the file lists or event lists of multiple patients to obtain an EEG database file list and an EEG database event list, and outputting and saving the list, specifically:

[0034] Since the column contents of the lists between patients are consistent, the lists of multiple patients are merged vertically to form an EEG database file list and an EEG database event list containing EEG metadata information of multiple patients.

[0035] Some possible implementations further include the step of screening a specific event summary for the EEG database file list, obtaining a specific event file list for output, wherein the specific event occurs in a dispersed or continuous manner, specifically:

[0036] By setting a specific event summary, when the set event summary is "attack", a list of all files containing attack events in the entire EEG database is obtained and output, where the file list also contains the path information of each EEG file unit package. This list can be used to batch read EEG data containing attack events.

[0037] In a second aspect, the present invention further provides a clinical electroencephalogram data reading device, the device comprising:

[0038] A path generation unit is configured to organize all 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 an original file and a cropped file; obtain data storage information based on metadata of the electroencephalogram data, and generate a first file list, wherein the first file list includes path information where the electroencephalogram data is located;

[0039] The list generation unit is configured as

[0040] Acquiring EEG acquisition process information based on metadata of the EEG data, and generating a second file list;

[0041] Acquire event tag information based on metadata of the EEG data, and generate first to third event lists based on the first file list and the second file list, wherein the first event list includes path information of the EEG data, the second event list includes EEG acquisition process information, and the third event list includes event content and event time information;

[0042] Deduplication of identical event contents occurring in the same electroencephalogram file unit package in the third event list is performed to form event summary information, thereby forming a third file list, wherein the third file list includes the event summary information;

[0043] Merge the first file list to the third file list to obtain a file list main axis; merge the first event list to the third event list to obtain an event list main axis; and identify 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, and move them to the file list branch and the event list branch respectively;

[0044] 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 of the same line of the main axis record line to indicate the derivative relationship between the original file and the trimmed file;

[0045] For each record line in the event list branch, match the record line in the event list main axis according to the absolute time of its event, and move the branch record line to the right of the same line of the main axis record line to clarify the inheritance relationship between the event label in the original file and the event label in the trimmed file; if there is no corresponding record line in the main axis, create a new record line in the main axis, still move the branch record line to the right of the same line of the main axis record line, and create label information according to the event label information in the current branch record line, that is, the trimmed file, to achieve reverse inheritance of event label information from the trimmed file to the original file;

[0046] The list output unit is configured to merge the file list main axis with the file list branch to obtain a final file list for a patient for output; merge the event list main axis with the event list branch to obtain a final event list for a patient for output; merge the file lists or event lists of multiple patients to obtain a database file list or a database event list for output; and extract record rows of specific event content from the database file list according to specific event keywords set by the user, and merge to obtain a specific event file list for output.

[0047] In a third aspect, the present invention further provides an electronic device, comprising:

[0048] at least one processor; and

[0049] A memory communicatively connected to the processor; wherein,

[0050] The memory stores instructions executable by the processor, and the instructions are executed by the processor to enable the processor to perform any one of the methods described above.

[0051] In a fourth aspect, the present invention further provides a computer-readable storage medium storing one or more programs, wherein the one or more programs include computer instructions, and the computer instructions are used to enable a computer to execute any one of the methods described.

[0052] The present invention adopts the above technical solution, and has the following characteristics:

[0053] 1. Patient-centric data management: During the patient's hospitalization, the present invention can integrate and manage all the patient's EEG data at different time periods and on different devices. No matter when and where the examination is performed, as long as it is the examination result of the same patient, the system will automatically aggregate them together to form a complete patient data record, which is convenient for doctors to conduct comprehensive diagnosis and treatment.

[0054] 2. Management logic based on the time axis: The list of the present invention contains the collection time information involved in each record line, which can be sorted to organize and display all the patient's EEG data in chronological order. Therefore, the doctor can clearly see the patient's examination results in different time periods, which is convenient for tracking and analyzing changes in the disease.

[0055] 3. Branch-based cropped file management: Based on the time axis, the present invention supports the display of the derivative relationship between the original file and the cropped file of the EEG data. The cropped file, as a branch of the time axis, can supplement the event label information missing in the original file, realize the reverse inheritance of event labels, and improve the metadata integrity of the original data, which is very important in continuous data processing.

[0056] 4. The present invention is based on the metadata of EEG data. By integrating event content information, generating event summaries, and then integrating with other metadata, the generated file list 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 causing inefficient file management.

[0057] 5. The file list of the present invention integrates the event summary and the file path, thereby realizing the function of quickly selecting files by screening the event summary. The specific event file list generated by this method carries formatted file path information and can be used as a directory for batch EEG data reading, thereby realizing the batch analysis function. This feature plays an important role in long-term EEG research and artificial intelligence research.

[0058] 6. While providing a new reading method, the present invention retains the storage structure provided by the original EEG manufacturer, so that all EEG data can be retrieved and played back according to routine clinical methods, realizing the characteristics of two-way services for clinical and scientific research.

[0059] 7. Compared with the file list presented in the prior art, the present invention provides event content information in the form of a summary, which is the key to giving the file list a new screening function. However, the event content information cannot be realized by simply reading the event tag data, but must go through the three key steps provided by the present invention: 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 too much event content and cannot be displayed normally. Among them, the reverse inheritance of event tags is a tricky problem, requiring the event tag content established in the cropped file to be seen in the original file, which is tantamount to carving a boat to find a sword; however, the present invention solves this problem by first establishing a derivative relationship between the original file and the cropped file (driving the boat back to its original place), and then finding the position where the event tag should be according to the absolute time of the event (fishing for the sword from the marked place).

[0060] In summary, the present invention can be widely used in EEG data management, mainly in clinical hospitals, to help doctors manage and review EEG data more efficiently, and improve the accuracy and efficiency of diagnosis and treatment; at the same time, it can also be applied to scientific research, allowing researchers to review and analyze data in batches, and promote the development of EEG-related research. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Throughout the accompanying drawings, the same reference numerals are used to represent the same components. In the accompanying drawings:

[0062] Figure 1 A schematic diagram of an EEG file list in the prior art;

[0063] Figure 2 A schematic diagram of a file arrangement process according to an embodiment of the present invention;

[0064] Figure 3 This is a conceptual diagram of folders and files at various levels according to an embodiment of the present invention;

[0065] Figure 4 A schematic diagram of the principle of generating the first patient file column according to an embodiment of the present invention;

[0066] Figure 5 A schematic diagram for generating a second file column for a patient according to an embodiment of the present invention;

[0067] Figure 6 A schematic diagram for generating the first, second and third event sequences of a patient according to an embodiment of the present invention;

[0068] Figure 7 A schematic diagram of the principle of generating the third patient file column according to an embodiment of the present invention;

[0069] Figure 8 A schematic diagram of the patient file list main axis and branch generation principle of an embodiment of the present invention;

[0070] Fig. 9 This is a schematic diagram of the principle of the main axis and branch merging process of the patient file list according to an embodiment of the present invention;

[0071] Fig.10 A schematic diagram of a patient file list according to an embodiment of the present invention;

[0072] Fig.11 It is a schematic diagram of the main axis and branch generation principle of the patient event list in an embodiment of the present invention;

[0073] Fig.12 It is a schematic diagram of the principle of the main axis and branch merging process and the reverse inheritance process of the patient event list in an embodiment of the present invention;

[0074] Fig.13 A schematic diagram of a patient event list according to an embodiment of the present invention;

[0075] Fig.14 A schematic diagram of a database file list / specific event file list according to an embodiment of the present invention;

[0076] Fig.15 FIG. 4 is a structural diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0077] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.

[0078] Although the terms first, second, third, etc. can be used in the text to describe multiple elements, components, regions, layers and / or sections, these elements, components, regions, layers and / or sections should not be limited by these terms. These terms can only be used to distinguish an element, component, region, layer or section from another region, layer or section. Unless the context clearly indicates, terms such as "first", "second" and other numerical terms do not imply order or sequence when used in the text. Therefore, the first element, component, region, layer or section discussed below can be referred to as the second element, component, region, layer or section without departing from the teaching of the example embodiments.

[0079] For ease of description, spatially relative terms may be used herein to describe the relationship of one element or feature relative to another element or feature as shown in the figures, such as "inside", "outside", "inner side", "outer side", "below", "above", etc. Such spatially relative terms are intended to include different orientations of the device in use or operation in addition to the orientation depicted in the figures.

[0080] Due to various reasons, the efficiency of EEG data presentation and management is low. The present invention provides a clinical EEG data reading method, device, equipment and medium, including: aggregating EEG files of the same patient into the same path; based on the metadata of the patient's EEG data, obtaining data storage information, EEG 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 other methods; based on the metadata, the record lines from the cropped files in the two lists are moved to the list branches, and the record lines in the branches are matched with the main axis according to the acquisition time or event time; merging the main axis and the branch to generate the patient's file list and event list for output; merging the lists of multiple patients to generate the file list and event list of the database for output; screening the event summary to generate a specific event file list for output. Therefore, the present invention can improve the accessibility and management efficiency of data. Therefore, the present invention is based on the metadata of the electroencephalogram data, integrates event content information, generates event summaries, and then integrates them with other metadata. The generated file list can simultaneously display the path of the file unit package and the content information of the event label in the unit package, thereby solving the problem of inefficient file management caused by the lack of event content in the existing file list.

[0081] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.

[0082] In order to make the content of the present invention clearer, the relevant technical terms of the present invention are clearly defined:

[0083] Electroencephalogram: Electroencephalogram is a bioelectric signal generated by the brain that is collected by an amplifier. Its data is essentially the voltage amplitude collected by each electrode channel. It is sampled at a stable frequency over a period of time to obtain a set of time series.

[0084] EEG data: refers to the EEG data file saved by the EEG device through collecting operations on the patient's brain.

[0085] Metadata of EEG data: It is data describing the EEG data. In the present invention, it specifically includes data storage information, EEG acquisition process information, event tag information, etc. Among them, data storage information includes the storage path and folder name of the data; EEG acquisition process information includes the name of the patient, medical record number, EEG number, sampling rate, number of channels, the start time of the file acquisition, duration, number of the file in the data packet, etc.; event tag information includes the time information of the event and the content of the event, etc.

[0086] EEG file unit package: It is the default storage format of EEG data and the smallest unit of complete EEG data, including a section of EEG data and its metadata. EEG file unit packages can exist independently and can be read and played back by the original EEG reading software. By default, the continuously collected EEG will package the collected data at a set period (such as 1 hour) and save them as EEG file unit packages one by one.

[0087] EEG file integrated package: In the file storage solutions provided by some manufacturers, the continuously collected and saved EEG file unit packages are placed in a folder, which is called the EEG file integrated package in the present invention.

[0088] Event: During the EEG acquisition process, the patient may receive various forms of stimulation, such as flash stimulation, electrical stimulation, etc., and spontaneous events such as epileptic seizures may also occur. All information worth recording that occurs during the EEG acquisition process can be called an event.

[0089] Event tag: A form of recording events in EEG data. Event tags can be directly input into the EEG device to generate event tags when the EEG is collected, or they can be added by EEG staff afterwards using the EEG reading software provided by the manufacturer. Event tag information includes the time when the event occurred and the content of the event.

[0090] Cropping: It is a routine operation in the clinical EEG workflow. Because clinical EEG is collected continuously, but an epileptic seizure may only last 5 to 10 minutes, it would be a waste of time to open an hour-long file package for each review, so in clinical practice, 5 to 10 minutes (or longer) of epileptic seizures are cropped to form an independent EEG file unit package.

[0091] Raw file: EEG file unit package saved directly by the EEG device.

[0092] Cropped file: The EEG reading software selects the start time and end time from the original file for cropping, and the saved EEG file unit package.

[0093] Absolute time and relative time of event labels: Absolute time refers to the time when the event occurs, which can be local time or Greenwich time; relative time refers to the time difference between the time when the event occurs and the beginning of this EEG file; it should be noted that since the start time of the cropped file after cropping is different from the start time of the original file, the relative time of the same event label in the original file is also different from the relative time in the cropped file.

[0094] Record row: The metadata of the EEG data is aggregated and presented as a row of information in the list.

[0095] Embodiment 1: The clinical EEG data reading method provided in this embodiment includes:

[0096] S1. File organization.

[0097] In this embodiment, the specific process of file organization is: gather the files of a patient together, that is, based on the metadata information of the EEG data, such as the patient's name, medical record number, EEG number and other information, the patient corresponding to each file can be identified, and then all the EEG data of the same patient are gathered into a folder, including the original file and the cropped file, and the folder can be named with the patient's name. Then the patient folder is placed in a suitable location in the EEG database for storage, for example, the earliest acquisition time of the patient can be used and placed in the month folder corresponding to this time, and this is taken as an example, but not limited to this.

[0098] like Figure 2 As shown, in order to take into account the automatic data upload, the EEG files collected by the same patient in different months will be saved in different paths by the example manufacturer, even if they are recorded continuously, for example, the EEG examinations of Li Si, Wang Wu, and Zhu Liu are all within a natural month, so there is no problem. However, when Zhang San had an EEG examination for a period of time in March, he had another EEG examination in April due to various reasons such as insufficient number of seizures. At this time, the example manufacturer's EEG will save Zhang San's data in the March path and the April path respectively, resulting in the dispersion of data storage. Therefore, the present invention will move the files of the same patient in the later month to the earliest collection month, so that all the files of a patient are gathered together.

[0099] S2. Organization structure of the patient’s EEG data.

[0100] In this embodiment, the organizational structure of the sorted EEG data of a patient includes the following specific contents and concepts.

[0101] like Figure 3 As shown, the organization structure of the EEG file of patient Li Si is shown, and the present invention explains them one by one from small to large:

[0102] EEG data, Figure 3 "data.bdf" in it refers to the EEG data file saved by the EEG device through collection operations on the patient's brain. Other brands include EEG.edf, EEG.TRC, EEG.eeg and other formats or names. This is an example, but not limited to this.

[0103] Metadata of EEG data: It is data that describes the EEG data. In the present invention, it specifically includes data storage information, EEG acquisition process information, event label information, etc. Among them, the data storage information includes the storage path, number, folder name and other information of the data; the EEG acquisition process information includes the name of the patient, medical record number, EEG number, sampling rate, number of channels, the start time of the file acquisition, duration, the number of the file in the data packet, folder name and other information; the event label information includes the time information of the event and the content of the event and other information. Figure 3 In the example, the metadata consists of multiple .Json files and evt.bdf files. Other brands include EEG.mrk, patient.mdb, EEG.ng and other files, or are merged into EEG data files, such as EEG.TRC, EEG.edf and other files. This is an example and is not limited to this.

[0104] EEG file unit package: It is the default storage format for EEG data and is the smallest unit of complete EEG data, including a segment of EEG data and its metadata. EEG file unit packages can exist independently and can be read and played back by the original EEG reading software. By default, the continuously collected EEG data will be packaged at a set period (such as 1 hour) and saved as individual EEG file unit packages; Figure 3 In the example, the folders named by natural numbers from "1" to "14" are EEG file unit packages. Other brands may use other naming rules or do not have this level of organizational structure. This is an example and is not limited to this.

[0105] EEG file integrated package: In the file storage solutions provided by some manufacturers, the continuously collected and saved EEG file unit packages will be placed in a folder, which is called the EEG file integrated package in the present invention; other brands may not have this level of organizational structure, and this is taken as an example, not limited to this.

[0106] like Figure 3As shown, Li Si's patient folder contains an EEG file integration package and two cropped files. Cropping: is a routine operation in the clinical EEG workflow. Because clinical EEG is collected continuously, but an epileptic seizure may only last 5 to 10 minutes, it would be a waste of time to open an hour-long file package for each review, so clinically, 5 to 10 minutes (or longer) of epileptic seizures will be cropped to form an independent EEG file unit package. In order to distinguish, this embodiment adopts the following definition:

[0107] Original file: EEG file unit package directly saved by EEG equipment;

[0108] Cropped file: The EEG file unit package saved by the EEG reading software by selecting the start time and the end time from the original file for cropping operation; in the description of the invention, when referring to the EEG file unit package, unless otherwise specified, it does not specifically refer to it as an original file or a cropped file.

[0109] like Figure 3 As shown, the two folders with the suffix "clip" are clipped files, which contain EEG data and metadata. Therefore, the clipped files also belong to the EEG file unit package. Other brands may use other naming rules. This is an example and is not limited to this.

[0110] For the present invention, the sorted electroencephalogram data of a patient should contain at least one electroencephalogram file unit package before the subsequent steps can be performed. Generally, there will be multiple electroencephalogram file unit packages and multiple cropped files in a sorted patient folder.

[0111] S3. Acquire data storage information based on the metadata of the electroencephalogram data and generate a first file list.

[0112] In this embodiment, generating a first file list based on the metadata of the EEG data includes: in the patient folder, traversing each EEG file unit package of the patient to confirm that it includes the EEG data and metadata. Figure 4 As shown in FIG. 1 , in the patient folder of patient Wang Wu in this embodiment, there are 12 EEG file unit packages, of which 10 are original files and 2 are cropped files. You can search and verify whether the EEG data and metadata under the EEG file unit package path exist. If they exist, the unit package is considered complete and valid, and its path is saved in the first file list, such as Figure 4 shown.

[0113] S4. Obtaining EEG acquisition process information based on the metadata of the EEG data, and generating a second file list.

[0114] In this embodiment, taking a certain brand of EEG data file as an example, the metadata of the EEG data is stored in a JSON file, and the metadata related to the EEG acquisition process is read from the JSON file, such as Figure 5 As shown, each EEG file unit package corresponds to a line of information, including the name of the patient, medical record number, EEG number, sampling rate, number of channels, acquisition start time, acquisition duration, EEG unit package number, etc. The second file list is generated through the above information.

[0115] Furthermore, example brand EEG data includes files such as JsonVersion.json, RecordInfo.json, videoinfo.json, ExamInfo.json, datainfo.json, and other files, and other brands include files such as EEG.mrk, EEG.TRC, patient.mdb, EEG.ng, etc. This is an example and is not limited to this.

[0116] S5. Generate first to third event lists 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.

[0117] In this embodiment, based on the event tag information in the metadata of the EEG data, and based on the first file list and the second file list, the first event list to the third event list are generated. The first event list includes the path information where the EEG data is located, the second event list includes the EEG acquisition process information, and the third event list includes the event content and event time information. The specific implementation process is:

[0118] S51 . Acquire event tag information from metadata. In this embodiment, the event tag information is acquired by reading metadata in each unit package, such as the evt.bdf file.

[0119] Furthermore, the event tag information includes the event content and the time of the event.

[0120] The event content is usually a string. When there is no event label in a unit package, the event content is recorded as "NaN", indicating that there is no event, and the relative time of the event is recorded as 0.

[0121] There are two ways to express the time information in the event tag information, namely absolute time and relative time: Absolute time refers to the time when the event occurs, which can be local time or Greenwich time; Relative time refers to the time difference between the time when the event occurs and the start of the acquisition of this EEG file, usually in seconds; It should be noted that since the start time of the cropped file after cropping is different from the start time of the original file, the relative time of the same event tag in the original file is also different from the relative time in the cropped file. For EEG reading software, using relative time is more conducive to displaying the location of event tags, so most manufacturers save the time information of event tags in relative time by default. For example, the event content, event number and relative time of the event tag can be obtained from the EEG metadata of the example manufacturer. Based on this information, a third event list can be generated, such as Figure 6 shown.

[0122] In order to maintain a consistent logical relationship, this embodiment refers to the list that stores data storage information as the first event list, the list that stores EEG acquisition process information as the second event list, and the list that stores event tag information as the third event list. This order is only to more clearly present the role of the present invention, 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 in the event list, the third event list is generated first for the event list, and the first and second event lists are completed in subsequent steps.

[0123] S52: Generate first and second event lists

[0124] While acquiring the event tag information, the data storage information and the EEG acquisition process information are integrated. Specifically, as in the present embodiment, after reading the evt.bdf file, the metadata files such as datainfo.json in the same path can be read to obtain the data storage information and the EEG acquisition process information, and the first and second event lists are generated based on this information. An EEG file unit package may contain multiple event tags, but the unit package has only one set of data storage information and EEG acquisition process information; and because the event list uses each event tag as a record line, in the event list, the event tags existing in the same EEG file unit package have the same contents in the first and second event list record lines, such as Figure 6 shown.

[0125] S53. Calculate the absolute time of the event.

[0126] In this embodiment, for each record line of the event tag, 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 a Unix timestamp, which is converted to local time in the format of yyyyMMdd_HH:mm:ss; then the relative time is added to the collection start time through an addition operation. The absolute time of the event calculated is the time point when the event actually occurred. This information is saved in the third event list, such as Figure 6 shown.

[0127] S54. The data may be sorted.

[0128] In this embodiment, "collection start time" is used as the key field for sorting, and the data are sorted from early to late. The specific time of the earliest collection of the patient is obtained, and the data timeline based on a patient is also established through sorting, so that the information of all EEG file unit packages is arranged in chronological order.

[0129] S6. De-duplicate the event contents in the same EEG file unit package to form an event summary, thereby forming a third file list.

[0130] In this embodiment, the event list uses each event tag as a record line, while the file list uses each EEG file unit package as a record line. When an EEG file unit package contains multiple event tags, the record lines of the two lists will be different. It is necessary to convert multiple event tags in the same EEG 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 the lowest possible loss, the event content information needs to be compressed or summarized.

[0131] If there is no event tag in an EEG file unit package, the event content is "NaN", indicating no event; or if there is only one event tag in an EEG file unit package, when the above two situations occur, the EEG file unit package only occupies one record line in the event list, and there is no need to compress the event content. The event summary is the same as the event content. If there are multiple event tags in an EEG file unit package, the event summary is generated by removing duplicate character strings; in this embodiment, Figure 7As shown in the figure, there are multiple "interval discharge" event contents in the first EEG file unit package. By removing repeated character strings, only one "interval discharge" is retained. In addition, for common events, specific elimination rules are set to reduce excessive character elimination. For example, common epileptic seizure events in EEG collection have three event markers "Pre", "seizure", and "end". By eliminating repeated character strings, an intermediate result such as "Pre seizure nd" will be generated. Then, the result of "Pre seizure nd" can be identified through the set rules and replaced with "Pre seizure end" to generate a clearer event summary.

[0132] S7: Merge the first, second and third file lists to generate a main axis of the file list, and remove the record line of the cropped file based on the identifier of the cropped file in the metadata to generate a branch of the file list.

[0133] In this embodiment, Figure 8 As shown, in this embodiment, the folder names of the EEG file unit packages of the cropped files all have the "clip" string as a suffix; other manufacturers may have other identifiers. By identifying the cropped file, the record lines from the cropped file in the merged file list are removed, and another file list, i.e., the file list branch, is generated by combining. The file list main axis and the file list branches both contain a variety of metadata information such as data storage information, acquisition process related information, event label information, etc. The file list main axis are all record lines from the original file, and the file list branches are all record lines from the cropped file.

[0134] S8. Merge the file list main axis and the file list branch.

[0135] In this embodiment, the file list uses each EEG file unit package as a record line, and the event list uses each event tag as a record line; the file list displays event summaries, while the event list displays complete event tag content; the file list branch displays the derivative relationship between the original file and the cropped file, while 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.

[0136] In this embodiment, based on the metadata information in the file list main axis and the file list branch, the record line of the cropped file can be matched with the record line of the original file to clarify the derivative relationship between the original file and the cropped file; in this embodiment, if Fig. 9As shown in the figure, the matching of the cropped file and the original file depends on the acquisition start time in the two record lines, where 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 cropped file must be within this range. According to this principle, all the record lines in the file list branch can be matched; if some manufacturers set the original file information of the cropped file in the metadata of the cropped file, they can also match by reading this information. When the matching original file record line is found, the record line of the cropped file is moved to the right side of the same line (branch part) to realize the merger of the file list main axis and the file list branch; if the corresponding record line is not found, a new record line is created in the file list main axis, and the record line of the cropped file is still moved to the right side of this newly created record line (branch part), and then the information of the cropped file is used to supplement the blank information in the main axis of the new record line. The newly created record lines may be concentrated at the end of the file list. After all the record lines of the file list branch are matched, the sorting can be re-executed and sorted by the acquisition start time.

[0137] After the above steps, a complete file list is obtained, which is output and saved as the patient's file list, such as Fig.10 As shown, the left side is the main axis of the file list, which is arranged in chronological order and includes metadata information such as data storage information, EEG acquisition process information, event label information, etc. In particular, in this embodiment, the event label information is saved in the form of event summary in the file list; the right side is the file list branch, which also includes the above-mentioned metadata; the information in the branch comes from the cropped file, and the information in the main axis comes from the original file.

[0138] S9. Merge the event list main axis and the event list branch.

[0139] In this embodiment, based on the metadata information in the event list main axis and event list branch, the record line of the event label in the cropped file can be matched with the record line of the event label in the original file to clarify the inheritance relationship between the event label in the original file and the event label in the cropped file. Fig.11 As shown, the record line of the event label in the clip file has the "clip" string as a suffix, and the record line of the event label from the clip file in the merged event list is removed and combined to generate another event list, namely, the event list branch.

[0140] The matching of event labels in the cropped file and the event labels in the original file depends on the absolute time and content of the event in the two event label record lines, which should be completely consistent. As mentioned above, the relative time of events with the same event label may be different, so they cannot be used for matching. The matching principle is as follows Fig.12As shown in the figure, when a matching record line of the event label in the original file is found, the record line of the event label in the cropped file is moved to the right side of the same line (branch part), so as to merge the main axis of the event list with the branch of the event list; if the corresponding record line is not found, a new record line is created in the main axis of the event list, and the record line of the event label in the cropped file is still moved to the right side of the newly created record line (branch part), and then the information of the event label in the cropped file is used to supplement the blank information in the main axis of the new record line. It should be noted that the relative time of events with the same event label may be different, and the recording start time of its EEG file is also different. It is necessary to rely on the derivative relationship between the cropped file and the original file that has been clarified in S8 to supplement the acquisition start time of the original file in the newly created record line, and then use the absolute time of the event to make a difference to find the relative time of the event label in the original file, and supplement it in the newly created record line of the main axis of the event list; and the absolute time of the event and the content of the event are consistent in the main axis and the branch. The newly created record lines may be concentrated at the end of the list. After all the record lines of the event list branch are matched, the sorting can be re-executed and sorted using the collection start time.

[0141] After the above steps, a complete event list is obtained, which is output and saved as the patient's event list, such as Fig.13 As shown, the left side is the main axis of the event list, which is arranged in chronological order, and contains metadata information such as data storage information, EEG acquisition process information, event label information, etc. In particular, in this 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; the information in the branch comes from the cropped file, and the information in the main axis comes from the original file; further, if the information in the main axis is supplemented by the branch, it will be marked in the record line. In this embodiment, such a record line is marked with "reverse inheritance" in the original or cropped column. It should be noted that reverse inheritance is intended to align the event information in the original file with the cropped file, which is very important. It ensures the integrity of the information in the main axis of the event list and lays the foundation for generating a complete file list and data list.

[0142] S10. Merge and generate a database file list or a database event list.

[0143] In this embodiment, in a parent directory containing multiple patient folders, the above steps are performed for each patient folder to generate a file list and an event list for each patient. Because the column format is consistent, the file lists or event lists of different patients can be merged vertically and saved as a database file list or a database event list, such as Fig.14 shown.

[0144] S11. Generate a specific event file list based on the database file list.

[0145] In this embodiment, the database file list contains EEG file information of multiple patients and information about the events that occurred. By identifying the content of a specific event, the corresponding record line can be extracted to generate a specific event file list. Fig.14 As shown, the record lines with the event summary of "Pre attack end" are selected, and the record lines that meet the conditions of different patients are merged to form a specific event file list containing "attack events".

[0146] Furthermore, the specific event file list realizes the retrieval of EEG file unit packages containing specific events in the complete database, which is an important function realized by the present invention. In the prior art, even for a single patient folder, it is impossible to filter specific events, such as Figure 1 As shown, although the original manufacturer's EEG software lists the file path, it cannot provide the event summary of the file, so it is impossible to perform batch screening of data. However, through the present invention, not only the specific event file screening of one patient is realized, but also the file screening of the same specific event of multiple patients is realized. This function plays an important role in the retrieval of large quantities of data in scientific research. In this embodiment, the storage path information of each EEG file unit package is provided in the specific event file list. Through a simple loop code, the relevant EEG data can be read line by line, thereby realizing the function of batch data retrieval.

[0147] S12. Write the reverse inherited event labels into the EEG metadata.

[0148] In this embodiment, the user can selectively perform this step. After completing the above steps, only the reverse inherited event labels can be seen in the event list. If you need to see the reverse inherited event labels when viewing the original file in the original image reading software, you need to perform the following steps:

[0149] Based on the completed information, an evt.bdf file can be generated (the example manufacturer is evt.bdf, other manufacturers may use EEG.mrk and other files that save event information). Based on the user's choice, the evt.bdf file of the original data is replaced. After the replacement, it can be opened through the original EEG reading software to see the event markers from the cropped file.

[0150] The present invention designs two related lists, namely a file list and an event list. One important reason is that the event summary may cause a certain degree of information loss in the file list. Therefore, the present invention designs a matching event list to supplement it, so as to display complete event information.

[0151] S13. Preservation and output of patient file lists and event lists, database file lists and event lists, and specific event file lists or event lists.

[0152] After completing the above steps, the patient file list and event list, database file list and event list, and specific event file list or event list generated can be saved as Excel files or .mat files in Matlab for later review and editing.

[0153] In a preferred embodiment of the present invention, due to the problem of incompatibility between EEG devices of different manufacturers, it also includes a step of pre-formatting the EEG data. The specific process is: reading the EEG data and its accompanying metadata, generating a new file according to a unified format, and if some information is missing, it is filled in to a certain extent. For example, the unified format is to save the EEG file in bdf format and the metadata in json format.

[0154] Furthermore, the data format can be unified by using a function of EEGlab in Matlab to read files from multiple manufacturers and save them in a unified format. This is an example, but not limited to this.

[0155] In a preferred embodiment of the present invention, the processing and integration of EEG metadata is completed through the above steps. Although the storage location of the original data is sorted out to a certain extent, the data structure is not damaged, so that the original EEG software can be accessed as before. In this preferred embodiment, the sorted database can be accessed by two parties. One party is clinical staff. Since all data are regrouped by patient name, clinical case access is more convenient, and doctors can easily access and manage individual patients' EEG data; the other party is scientific research staff. For large model data analysis and research, batch access is required. The database file list or specific event file list generated by the above steps can quickly select the required attack period, stimulation period, task period, rest period, etc., and use the data path information in the list to enable batch scripts to run automatically, eliminating the time and economic cost of copying traditional data one by one, and facilitating large-scale data analysis and research.

[0156] In a preferred embodiment of the present invention, by setting a specific collection start time, such as nighttime or early morning, a list of EEG files of different patients with the same collection time can be obtained for output; this list can be used for batch EEG data reading for studying circadian rhythm EEG changes in scientific research.

[0157] In a preferred embodiment of the present invention, by setting a specific acquisition duration, a list of EEG files acquired continuously over a long period of time can be obtained for output; this list can be used for reading EEG data of long-term EEG changes in scientific research.

[0158] In summary, compared with the file list presented in the prior art, the present invention provides event content information in the form of a summary, which is the key to giving the file list a new screening function. However, the event content information cannot be realized by simply reading the event tag data, but must go through the three key steps provided by the present invention: 1. Aggregating 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 too much event content and cannot be displayed normally. Among them, the reverse inheritance of event tags is a tricky problem, requiring the event tag content established in the cropped file to be seen in the original file. The principle of this requirement is very similar to "carving a boat to find a sword". The original collected EEG file lasts for a long time, 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 carving a mark on a boat. Without a logically clear file management system, it is impossible to locate the position of the sword. However, the metadata processing method constructed by the present invention establishes a clear logic, which first establishes a derivative relationship between the original file and the cropped file (driving the boat back to its original position), and then finds the position where the event tag should be based on the absolute time of the event (fishing the sword out of the water from the marked position), thereby solving this problem.

[0159] Embodiment 2: Embodiment 1 above provides a clinical EEG data reading method, and correspondingly, this embodiment provides a clinical EEG data collating device. The device provided in this embodiment can implement the clinical EEG data reading method of embodiment 1, and the device can be implemented by software, hardware, or a combination of software and hardware. For the convenience of description, this embodiment is described by dividing the functions into various units and describing them separately. Of course, the functions of each unit can be implemented in the same or one or more software and / or hardware during implementation. For example, the device may include integrated or separate functional modules or functional units to execute the corresponding steps in each method of embodiment 1. Since the device of this embodiment is basically similar to the method embodiment, the description process of this embodiment is relatively simple, and the relevant parts can refer to the partial description of embodiment 1. The embodiment of the clinical EEG data collating device based on the timeline and branch management logic provided by the present invention is only schematic.

[0160] Specifically, the clinical EEG data collating device provided in this embodiment includes:

[0161] A path generation unit is configured to organize all 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 an original file and a cropped file;

[0162] A list generation unit is configured to obtain data storage information based on the metadata of the electroencephalogram data, generate a first file list, wherein the first file list includes path information of the electroencephalogram data; obtain electroencephalogram acquisition process information based on the metadata of the electroencephalogram data, and generate a second file list; obtain event tag information based on the metadata of the electroencephalogram data, and generate a first event list to a third event list based on the first file list and the second file list, wherein 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; deduplicate the same event content in the third event list that occurs in the same electroencephalogram file unit package to form event summary information, and form a third file list, wherein the third file list includes event summary information; merge the first file list to the third file list to obtain a file list main axis; merge the first event list to the third event list to obtain an event list main axis ; Based on the metadata of the EEG data, the record lines from the cropped file in the main axis of the file list and the main axis of the event list are identified, and they are moved to the file list branch and the event list branch respectively; for each record line in the file list branch, the record line in the main axis of the file list is matched according to its acquisition start time, and the branch record line is moved to the right side of the same line of the main axis record line to indicate the derivative relationship between the original file and the cropped file; for each record line in the event list branch, the record line in the main axis of the event list is matched according to the absolute time of its event, and the branch record line is moved to the right side of the same line of the main axis record line to clarify 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 axis, a new record line is created in the main axis, and the branch record line is still moved to the right side of the same line of the main axis record line, and label information is created according to the event label information in the current branch record line, i.e., the cropped file, to realize the reverse inheritance of event label information from the cropped file to the original file;

[0163] The list output unit is configured to merge the file list main axis with the file list branch to obtain a final file list for a patient for output; merge the event list main axis with the event list branch to obtain a final event list for a patient for output; merge the file lists or event lists of multiple patients to obtain a database file list or a database event list for output; and extract record rows of specific event content from the database file list according to specific event keywords set by the user, and merge them to obtain a specific event file list for output.

[0164] In a preferred embodiment of the present invention, the list generation unit includes a timeline processing module and a branch management module;

[0165] Timeline processing module: With the timeline as the core, the EEG data of patients in different time periods and devices are uniformly organized and managed. All EEG data are sorted based on time to establish a clear time sequence. Each event has an absolute timestamp to ensure that all data and events can be accurately arranged and managed according to the timeline. This function is the basis of the system's timeline management.

[0166] Branch management module: Based on the timeline, it is used to trim and mark EEG data. Based on the branch, you can quickly understand the logical relationship between the trimmed file and the original file, which is convenient for sorting out the situation before and after the event in the trimmed file, and can realize the reverse inheritance function. The trimmed files are branches of the timeline, which is convenient for doctors to mark and review the patient's seizure time and important events.

[0167] In a preferred embodiment of the present invention, a data security module is further included. The data security module is physically isolated from the Internet to form a secure internal database, thereby ensuring the security and privacy protection of patient data while reducing security costs.

[0168] In a preferred embodiment of the present invention, a data display unit is further included. The data display unit uses a variety of information display methods to display data, including:

[0169] Summary display: Take each folder as a unit, display a condensed message in each line, summarize all events in the folder, and generate a string output.

[0170] Detailed display: Take each event as a unit to display more comprehensive information. Each piece of information is linked to the corresponding database location. Each event tag has a file path. The original file in the database can be retrieved through the file path, thereby realizing batch and purposeful file retrieval, which is very important in scientific research.

[0171] In a preferred embodiment of the present invention, it also includes a data format conversion module, which can automatically identify and convert the EEG data formats of different devices to ensure that the data can be uniformly organized.

[0172] In a preferred embodiment of the present invention, the event marking unit, the management unit and the absolute time synchronization unit are also included, including:

[0173] Event marking unit: On the EEG machine next to the bed, patients, family members or caregivers can make marks on the EEG by pressing a button. These marks are recorded on paper, and the next day the doctor will review the EEG video and records based on the time point and make accurate annotations.

[0174] Event Management Unit: The doctor will mark the EEG changes, onset time, end time, etc. These marks generate a special file and are stored in the EEG record folder of the corresponding time period.

[0175] Absolute Time Synchronization Unit: Every event has an absolute time stamp, ensuring that all data and events can be precisely arranged and managed in time.

[0176] In a preferred embodiment of the present invention, the folder naming rule is: all single one-hour EEG data are named "name + collection start time" for easy search and management. 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.

[0177] Embodiment 3: This embodiment provides an electronic device corresponding to the clinical EEG data reading method provided in Embodiment 1. The electronic device may be an electronic device for a client, such as a mobile phone, a laptop computer, a tablet computer, a desktop computer, etc., to execute the method of Embodiment 1.

[0178] like Fig.15 As shown, the electronic device includes a processor, a memory, a communication interface and a bus, and the processor, the memory and the communication interface are connected through the bus to complete mutual communication. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus or an Extended Industry Standard Component (EISA) bus, etc. The memory stores a computer program that can be run on the processor. When the processor runs the computer program, it executes the method of embodiment 1. The implementation principle and technical effect are similar to those of embodiment 1 and will not be repeated here. Those skilled in the art can understand that Fig.15 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present application, and does not constitute a limitation on the computing device to which the scheme of the present application is applied. The specific computing device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0179] In a preferred embodiment, the logic instructions in the above-mentioned memory can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), optical disk and other media that can store program codes.

[0180] In a preferred embodiment, the processor may be a central processing unit (CPU), a digital signal processor (DSP) or other general-purpose processors of various types, which are not limited herein.

[0181] Embodiment 4: This embodiment provides a computer-readable storage medium storing one or more programs, wherein the one or more programs include computer instructions. When the computer instructions are executed by a computer, the computer executes the method provided in the above-mentioned embodiment 1.

[0182] Embodiment 5: This embodiment provides a computer program product. The computer program product may include a computer program stored on a computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the method provided in the above-mentioned embodiment 1. Its implementation principle and technical effects are similar to those of embodiment 1 and will not be repeated here.

[0183] In a preferred embodiment, the computer-readable storage medium may be a tangible device that holds and stores instructions used by the instruction execution device, such as but not limited to an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any combination thereof. The computer-readable storage medium stores computer program instructions that cause the computer to execute the method provided in the first embodiment.

[0184] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In the description of this specification, the description of reference terms "a preferred embodiment", "further", "specifically", "in the present embodiment", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiment of this specification. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples without contradiction.

[0185] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for reading clinical electroencephalogram data, It is characterized in that The method includes: Arrange all EEG data of the same patient scattered in different paths into a set same path to form a path of the EEG data of the patient, wherein the EEG data includes an original file and a cropped file; Acquire data storage information based on metadata of the EEG data, and generate a first file list, wherein the first file list includes path information where the EEG data is located; Acquiring EEG acquisition process information based on metadata of the EEG data, and generating a second file list; Event label 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 includes the path information of the electroencephalogram data, the second event list includes the electroencephalogram acquisition process information, and the third event list includes the 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 as follows: the event label information includes the time and content of the event label, and a record line is established for each event label to save the absolute time, relative time and event content of the event; the third event list includes the time and content of all event labels of the patient; for each record line in the third event list, the corresponding first event list information, i.e., data storage information, and second event list information, i.e., electroencephalogram acquisition process information, are supplemented; if an electroencephalogram file unit package contains multiple events, the data storage information and electroencephalogram acquisition process information of the record lines of these event labels are the same; Deduplication of identical event contents occurring in the same electroencephalogram file unit package in the third event list is performed to form event summary information, and a third file list is generated, wherein the third file list includes the event summary information; The first file list, the second file list and the third file list are merged to obtain the file list main axis; the first event list, the second event list and the third event list are merged to obtain the event list main axis; and the record lines from the cropped file in the file list main axis and the event list main axis are identified based on the metadata of the electroencephalogram data, and they are moved to the file list branch and the event list branch respectively, including: the metadata of each electroencephalogram file unit package has an identifier that identifies 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 both 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 its collection start time, and the branch record line is moved to the right of the same line of the main axis record line to indicate the derivative relationship between 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 branches are 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 clarify the derivative relationship between the original file and the cropped file; the collection start time of the cropped file should be within the range from the collection start time to the end time 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 is matched with the file list main axis to synthesize a complete file list for the patient for output; For each record line in the event list branch, match the record line in the event list main axis according to the absolute time of its event, and move the branch record line to the right of the same line of the main axis record line to clarify 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 axis, create a new record line in the main axis, and still move the branch record line to the right of the same line of the main axis record line, and create label information according to the event label information in the current branch record line, that is, the cropped file, to achieve reverse inheritance of event label information from the cropped file to the original file; among them, the event list main axis are all record lines from the original file, and the event list branches are 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 clarify 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, if the acquisition time of the cropped file includes this event, then this event label will be inherited to the cropped file. In this case, the absolute time of the event tags in the two places are consistent with the event content. 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 tags in the two places is different. The event tags in the cropped file are matched with the event tags in the original file by using the consistent rules of absolute time and 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 tags are marked in the cropped file, the corresponding event tags will be missing in the original file, resulting in the lack of corresponding record rows in the event list main axis. By traversing each record row of the event list branch, these unmatched record rows can be found. A new record row is created for it in the event list main axis to match the two. The existing event tag information can be used to complete the information in the newly created record row in the main axis, and it is noted that the record row is reversely inherited from the event tag in the cropped file. The event list branch and the event list main axis are matched to synthesize a complete event list for the patient for output. Merge the file list main axis with the file list branch to obtain the final file list for output; Merge the event list main axis with the event list branch to obtain the final event list for output.

2. The clinical EEG data reading method according to claim 1, It is characterized in that It also includes the step of aggregating all EEG data of the same patient into a folder based on the patient information. The specific process is: all EEG data of the same patient are moved and stored in a folder named after the patient, including original files and cropped files. The earliest collection time of the patient is used as the basis, and the patient folder is stored in the month folder corresponding to this time.

3. The clinical EEG data reading method according to claim 1, It is characterized in that Acquire data storage information based on the metadata of the electroencephalogram data and 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 EEG data unit package of the patient is traversed to confirm that it includes EEG data and metadata, and the paths of these EEG data unit packages are saved in the first file list.

4. The clinical EEG data reading method according to claim 1, It is characterized in that Based on the metadata of the EEG data, the EEG acquisition process information is obtained and a second file list is generated, specifically: The EEG acquisition process information includes the patient's name, medical record number, EEG number, sampling rate, number of channels, file acquisition start time, duration, and EEG data unit package number; in the patient folder, traverse each EEG data unit package of the patient to obtain the EEG acquisition process information to form a second file list; the second file list includes the patient's name, medical record number, EEG number, sampling rate, number of channels, file acquisition start time, duration, and EEG data unit package number.

5. The clinical EEG data reading method according to claim 1, It is characterized in that The same event content occurring in the same electroencephalogram file unit package in the third event list is removed to form event summary information, thereby forming a third file list, specifically: The third event column includes the event content of each event label. Based on the event content of multiple event labels occurring in an electroencephalogram file unit package, the event content is converted into a character string, and the event summary is generated by removing repeated character strings; if there is no event label in an electroencephalogram file unit package, an event summary "NaN" is generated, indicating no event; when an attack has three event tags "Pre", "attack" and "end", through character string recognition, key characters are selectively retained to generate an event summary of "Pre attack end"; 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 clinical EEG data reading method according to claim 1, It is characterized in that The method also includes vertically merging the file lists or event lists of multiple patients to obtain an EEG database file list and an EEG database event list, and outputting and saving the list, specifically: Since the column contents of the lists between patients are consistent, the lists of multiple patients are merged vertically to form an EEG database file list and an EEG database event list containing EEG metadata information of multiple patients.

7. The clinical EEG data reading method according to claim 1, It is characterized in that The method further includes the steps of screening a specific event summary for the EEG database file list, obtaining a specific event file list for output, wherein the specific event occurs in a dispersed manner or continuously, specifically: By setting a specific event summary, when the set event summary is "attack", a list of all files containing attack events in the entire EEG database is obtained and output, where the file list also contains the path information of each EEG file unit package. This list can be used to batch read EEG data containing attack events.

8. A clinical electroencephalogram data reading device, It is characterized in that The device includes: A path generation unit is configured to organize all 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 an original file and a cropped file; The list generating unit is configured to obtain data storage information based on the metadata of the electroencephalogram data, generate a first file list, wherein the first file list includes the path information of the electroencephalogram data; obtain the electroencephalogram acquisition process information based on the metadata of the electroencephalogram data, and 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 includes the path information of the electroencephalogram data, the second event list includes the electroencephalogram acquisition process information, and the third event list includes the event content and the event time information; the same events in the third event list that occur in the same electroencephalogram file unit package are included in the The event content is deduplicated to form event summary information, and a third file list is formed, wherein the third file list includes the event summary information; the first file list, the second file list and the third file list are merged to obtain the file list main axis; the first event list, the second event list and the third event list are merged to obtain the 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 they are moved to the file list branch and the event list branch respectively; for each record line in the file list branch, according to its acquisition start time, the record line in the file list main axis is matched, and the branch record line is moved to the right of the same line of the main axis record line to indicate that the original file is different from the cropped file. The derivative relationship in the cut file; for each record line in the event list branch, match the record line in the event list main axis according to the absolute time of its event, and move the branch record line to the right of the same line of the main axis record line to clarify the inheritance relationship between the event label in the original file and the event label in the cut file; if there is no corresponding record line in the main axis, create a new record line in the main axis, and still move the branch record line to the right of the same line of the main axis record line, and create label information according to the event label information in the current branch record line, that is, the cut file, to achieve reverse inheritance of event label information from the cut file to the original file, where the event list main axis are all record lines from the original file, and the event list branches are all record lines from the cut 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 clarify the inheritance relationship between the event tags in the original file and the event tags in the cropped file. If an event tag is marked in the original file, if the acquisition time of the cropped file includes this event, then this event tag will be inherited to the cropped file; at this time, the event absolute time and event content of the event tags in the two places are consistent; and 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 tags in the two places is different. Using the consistent rules of absolute time and content, the event tags in the cropped file are matched with the event tags in the original file to clarify the inheritance relationship between the two;If the original file is first cropped to generate a cropped file, and then the event labels are marked in the cropped file, the corresponding event labels will be missing in the original file, resulting in the 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 created for it in the event list main axis to make the two match; the existing event label information can be used to complete the information in the newly created record line in the main axis, and it is noted that the record line is reversely inherited from the event label in the cropped file, and the event list branch is matched with the event list main axis to synthesize a complete event list for the patient for output; The specific process of generating the first event list, the second event list and the third event list is as follows: merging the first file list, the second file list and the third file list to obtain the file list main axis; merging the first event list, the second event list and the third event list to obtain the 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, and 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 that identifies 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 this identifier; the record lines in the main axis and the branch both 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 its collection start time, and the branch record line is moved to the right of the same line of the main axis record line to indicate the derivative relationship between 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 branches are 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 clarify the derivative relationship between the original file and the cropped file; the collection start time of the cropped file should be within the range from the collection start time to the end time 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 is matched with the file list main axis to synthesize a complete file list for the patient for output; The list output unit is configured to merge the file list main axis with the file list branch to obtain a final file list for a patient for output; merge the event list main axis with the event list branch to obtain a final event list for a patient for output; merge the file lists or event lists of multiple patients to obtain a database file list or a database event list for output; and extract record rows of specific event content from the database file list according to specific event keywords set by the user, and merge them to obtain a specific event file list for output.

9. An electronic device, It is characterized in that include: at least one processor; as well as A memory communicatively connected to 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 to 7.

10. A computer-readable storage medium storing one or more programs, It is characterized in that The one or more programs include computer instructions for causing a computer to execute the method according to any one of claims 1-7.