XML document standardization method and system for multiple electrocardiosignal storage

文档序号:1798810 发布日期:2021-11-05 浏览:25次 中文

阅读说明:本技术 面向多种心电信号存储的xml文档标准化方法及系统 (XML document standardization method and system for multiple electrocardiosignal storage ) 是由 王志远 徐占飞 孙庆华 王聪 于 2021-08-16 设计创作,主要内容包括:本发明公开了面向多种心电信号存储的XML文档标准化方法及系统,获取多种待标准化的原始心电信号;对每一种待标准化的原始心电信号进行信息抽取;对抽取的信息进行检验,得到检验编码;对抽取的信息进行数据标准化处理;设计目标XML文档数据结构;将检验编码与数据标准化处理后的信息,填充到目标XML文档数据结构中,得到标准化的心电信号XML文档。标准化处理后的XML文档拥有统一且简单的数据结构和统一的数据格式,比较的适用于读取分析。(The invention discloses an XML document standardization method and system for various electrocardiosignal storage, which are used for acquiring various original electrocardiosignals to be standardized; extracting information of each original electrocardiosignal to be standardized; checking the extracted information to obtain a check code; carrying out data standardization processing on the extracted information; designing a target XML document data structure; and filling the information after the check coding and data standardization processing into a target XML document data structure to obtain a standardized electrocardiosignal XML document. The standardized XML document has a uniform and simple data structure and a uniform data format, and is suitable for reading and analyzing.)

1. The XML document standardization method for various electrocardiosignal storage is characterized by comprising the following steps:

acquiring a plurality of original electrocardiosignals to be standardized; extracting information of each original electrocardiosignal to be standardized;

checking the extracted information to obtain a check code;

carrying out data standardization processing on the extracted information;

designing a target XML document data structure;

and filling the information after the check coding and data standardization processing into a target XML document data structure to obtain a standardized electrocardiosignal XML document.

2. An XML document standardization method for multiple electrocardiosignal storage according to claim 1, wherein information extraction is performed on each original electrocardiosignal to be standardized; the method specifically comprises the following steps:

extracting basic information of a patient, basic information of electrocardiosignals, lead data and other information;

the patient basic information comprises: patient ID, name, sex, age and electrocardiosignal automatic diagnosis;

the electrocardiosignal basic information comprises: the method comprises the steps of (1) creating time, sampling time, acquisition duration, resolution, a unit for describing time and a unit for describing potential of an electrocardiosignal;

lead data, comprising: 12 lead sample point values;

other information, including: measurement departments and data sources.

3. An XML document standardization method for multiple electrocardiographic signal storage according to claim 1, wherein the extracted information is inspected to obtain inspection codes; the method specifically comprises the following steps:

checking whether the format of the patient ID is correct and whether the number of sampling points of each lead is correct;

after the detection is finished, generating a detection code according to the error type;

the verification code includes: 00. 01, 10 and 11;

where "00" indicates a pass, "01" indicates a patient ID format error, "10" indicates a 12 lead data length error, and "11" indicates that a patient ID format error occurs simultaneously with a 12 lead data length error.

4. The method for standardizing an XML document stored for various electrocardiosignals according to claim 1, wherein the extracted information is subjected to data standardization processing; the method specifically comprises the following steps:

missing information supplement, unified data format and unified electrocardiosignal duration;

the missing information supplement is to set missing age information as a default value of 0;

the data format is uniform, which means that: converting the electrocardiogram data with different resolutions into a uniform resolution;

the unified electrocardiosignal duration means that two or more original electrocardiosignals are combined into one XML document.

5. An XML document normalization method for multiple ecg signal storage as claimed in claim 4, wherein the merging of two original ecg signals into one XML document specifically comprises:

based on the V4 lead, a section from the end point of the T wave to the starting point of the adjacent backward P wave is called a T-P section;

(1) calculating two adjacent T-P sections from the merging position of the two original electrocardiosignals forwards and backwards respectively;

(2) respectively calculating the number m and n of points of two adjacent T-P sections, and taking the average value

(3) Taking points backwards from the nearest T wave terminal point before the merging position, wherein the number of the points isObtain the number seriesA;

Taking points forward from the nearest P wave starting point after the merging position, wherein the number of the points isObtaining a sequence B;

the sequence B is inverted to obtain a sequence C, and the corresponding positions of the sequence A and the sequence C are averaged to obtain a sequence D; the length of the array A, B, C, D isThe number series D is used to replace the values of the sample points between the end of the most recent T wave before the merge to the start of the most recent P wave after the merge.

6. An XML document standardization method for multiple electrocardiosignal storage according to claim 1, wherein a target XML document data structure is designed; the method specifically comprises the following steps:

designing a target XML document data structure according to information needing to be stored, and describing by using an XML Schema document;

a target XML document data structure comprising: patient basic information, electrocardiogram basic information, lead data and other information;

the patient basic information comprises: patient ID, name, gender, age and electrocardiogram automatic diagnosis;

the basic information of the electrocardiogram comprises: the method comprises the steps of (1) creating time of an electrocardiogram, sampling time, acquisition duration, resolution, a unit for describing time and a unit for describing potential;

the lead data, comprising: converting the sampling point numerical values of 12 leads after resolution;

the other information includes: verification code, measurement department and data source.

7. The method for standardizing an XML document stored in multiple electrocardiosignals according to claim 1, wherein the information after the check code and the data standardization processing is filled in a target XML document data structure to obtain a standardized electrocardiosignal XML document; the method specifically comprises the following steps:

correspondingly storing the information after the inspection coding and the data standardization processing into a tag of an XML document, and storing the document after the XML Schema document passes the verification;

the verification comprises: the order of the elements, the relationships between the elements and the attributes, the data formats of the elements and the attributes and the values of the two satisfy the constraints.

8. An XML document standardization system for various electrocardiosignal storage is characterized by comprising:

an acquisition module configured to: acquiring a plurality of original electrocardiosignals to be standardized; extracting information of each original electrocardiosignal to be standardized;

a verification module configured to: checking the extracted information to obtain a check code;

a normalization processing module configured to: carrying out data standardization processing on the extracted information;

a structural design module configured to: designing a target XML document data structure;

a fill module configured to: and filling the information after the check coding and data standardization processing into a target XML document data structure to obtain a standardized electrocardiosignal XML document.

9. An electronic device, comprising:

a memory for non-transitory storage of computer readable instructions; and

a processor for executing the computer readable instructions,

wherein the computer readable instructions, when executed by the processor, perform the method of any of claims 1-7.

10. A storage medium storing non-transitory computer-readable instructions, wherein the non-transitory computer-readable instructions, when executed by a computer, perform the instructions of the method of any one of claims 1-7.

Technical Field

The invention relates to the technical field of standardization and information, in particular to an XML document standardization method and system for storing various electrocardiosignals.

Background

The statements in this section merely provide background information related to the present disclosure and may not constitute prior art.

In recent years, an electrocardiographic chart generated by using conventional 12-lead electrocardiographic data has become a means for detecting myocardial ischemia, and in order to further research the electrocardiographic chart, a large amount of electrocardiographic data needs to be acquired from a hospital, and the data is stored by an XML document. The XML files are generated by electrocardiographs of various manufacturers, and store data by using different XML document data structures, and the contained information is different and cannot be read in a uniform manner. In addition, the XML document of the original ecg signal contains some extra information, which requires extra costs in storing and transmitting the data.

Therefore, a standardized processing method is needed, which processes an XML document of original electrocardiosignals, and includes: the unified XML document data structure is used for storing data, so that invalid data storage is avoided, an original electrocardiosignal XML document with errors is marked, the data format is unified, and the like. Therefore, the normalization of the electrocardio data is improved, and the storage consumption is reduced.

Disclosure of Invention

In order to solve the defects of the prior art, the invention provides an XML document standardization method and system for storing various electrocardiosignals; the purpose is that the electrocardiosignal XML documents generated by various electrocardiographs are standardized to generate standardized electrocardiosignal XML documents, which is convenient for subsequent analysis.

In a first aspect, the invention provides an XML document standardization method for various electrocardiosignal storage;

an XML document standardization method for various electrocardiosignal storage comprises the following steps:

acquiring a plurality of original electrocardiosignals to be standardized; extracting information of each original electrocardiosignal to be standardized;

checking the extracted information to obtain a check code;

carrying out data standardization processing on the extracted information;

designing a target XML document data structure;

and filling the information after the check coding and data standardization processing into a target XML document data structure to obtain a standardized electrocardiosignal XML document.

In a second aspect, the invention provides an XML document standardization system for various electrocardiosignal storage;

an XML document standardization system for various electrocardiosignal storage comprises:

an acquisition module configured to: acquiring a plurality of original electrocardiosignals to be standardized; extracting information of each original electrocardiosignal to be standardized;

a verification module configured to: checking the extracted information to obtain a check code;

a normalization processing module configured to: carrying out data standardization processing on the extracted information;

a structural design module configured to: designing a target XML document data structure;

a fill module configured to: and filling the information after the check coding and data standardization processing into a target XML document data structure to obtain a standardized electrocardiosignal XML document.

In a third aspect, the present invention further provides an electronic device, including:

a memory for non-transitory storage of computer readable instructions; and

a processor for executing the computer readable instructions,

wherein the computer readable instructions, when executed by the processor, perform the method of the first aspect.

In a fourth aspect, the present invention also provides a storage medium storing non-transitory computer readable instructions, wherein the non-transitory computer readable instructions, when executed by a computer, perform the instructions of the method of the first aspect.

Compared with the prior art, the invention has the beneficial effects that:

1) the standardized XML document has a uniform and simple data structure and a uniform data format, and is relatively suitable for reading and analyzing;

2) the standardized XML document only keeps effective information, so that the storage consumption is reduced, and the transmission and the storage are relatively convenient;

3) and the automatic processing can be realized by using a programming language, and the processing speed is higher.

Advantages of additional aspects of the invention will be set forth in part in the description which follows, or may be learned by practice of the invention.

Drawings

The accompanying drawings, which are incorporated in and constitute a part of this specification, are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification, illustrate exemplary embodiments of the invention and together with the description serve to explain the invention and not to limit the invention.

FIG. 1 is a flowchart of a method for standardizing XML documents for various electrocardiosignals according to a first embodiment of the present invention;

fig. 2(a) to fig. 2(d) are illustrations of the merging effect of the adopted strategies according to the first embodiment of the present invention;

FIG. 3 is a diagram of an XML document data structure according to a first embodiment of the present invention;

fig. 4 is a content written in an XML Schema document according to a first embodiment of the present invention.

Detailed Description

It is to be understood that the following detailed description is exemplary and is intended to provide further explanation of the invention as claimed. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

Interpretation of terms: XML (eXtensible Markup Language)

Example one

The embodiment provides an XML document standardization method for storing various electrocardiosignals;

as shown in fig. 1, the method for standardizing an XML document for storage of multiple electrocardiographic signals includes:

s101: acquiring a plurality of original electrocardiosignals to be standardized; extracting information of each original electrocardiosignal to be standardized;

s102: checking the extracted information to obtain a check code;

s103: carrying out data standardization processing on the extracted information;

s104: designing a target XML document data structure;

s105: and filling the information after the check coding and data standardization processing into a target XML document data structure to obtain a standardized electrocardiosignal XML document.

Further, the step S101: acquiring a plurality of original electrocardiosignals to be standardized; the method specifically comprises the following steps:

obtaining XML documents of original electrocardiosignals collected by electrocardiogram instruments of different manufacturers.

Further, the step S101: extracting information of each original electrocardiosignal to be standardized; the method specifically comprises the following steps:

extracting basic information of a patient, basic information of electrocardiosignals, lead data and other information;

the patient basic information comprises: patient ID, name, sex, age and electrocardiosignal automatic diagnosis;

the electrocardiosignal basic information comprises: the method comprises the steps of (1) creating time, sampling time, acquisition duration, resolution, a unit for describing time and a unit for describing potential of an electrocardiosignal;

lead data, comprising: 12 lead sample point values;

other information, including: measurement departments and data sources.

Illustratively, the S101: there are three main types of electrocardiosignal XML documents obtained from hospitals, which are generated by R12 of Merrill, Nalong RAGE-12 and Libang SE-12 electrocardiographs respectively. The basic information and the lead data of the electrocardiosignals are simultaneously stored in an XML document generated by Meyer R12 and a Nippon SE-12 electrocardiograph, the basic information and the lead data of the electrocardiosignals are respectively stored in an XML document generated by Nalong RAGE-12, namely an electrocardiogram is stored by 2 XML files.

Reading various XML documents, determining the information contained in each document, selecting the extracted information according to the requirement, and dividing the extracted information into basic information of patients, basic information of electrocardiograms, lead data and other information. Wherein, the basic information of the patient comprises: patient ID, name, gender, age and electrocardiogram automatic diagnosis; the basic information of the electrocardiogram comprises: the method comprises the steps of (1) creating time of an electrocardiogram, sampling time, acquisition duration, resolution, a unit for describing time and a unit for describing potential; lead data: sample point values for conventional 12 leads; other information: measurement departments and data sources.

Storing the original electrocardiosignal XML document into a specified disk path, reading in sequence, automatically identifying according to the inherent format of the electrocardiosignal XML document generated by different electrocardio-electrographs, and selecting a corresponding reading mode to read corresponding information.

Further, the S102: checking the extracted information to obtain a check code; the method specifically comprises the following steps:

checking whether the format of the patient ID is correct and whether the number of sampling points of each lead is correct;

after the detection is finished, generating a detection code according to the error type;

the verification code includes: 00. 01, 10 and 11;

where "00" indicates a pass, "01" indicates a patient ID format error, "10" indicates a 12 lead data length error, and "11" indicates that a patient ID format error occurs simultaneously with a 12 lead data length error.

Further, the step S103: carrying out data standardization processing on the extracted information; the method specifically comprises the following steps:

missing information supplement, data format unification and electrocardiosignal duration unification.

Further, the missing information supplement means that the missing age information is set to a default value of 0.

Further, the data format is unified, which means that: and converting the electrocardiogram data with different resolutions into a uniform resolution.

Furthermore, the unified duration of the electrocardiosignals means that two or more original electrocardiosignals are combined into one XML document.

Further, the merging of the two original electrocardiographic signals into one XML document specifically includes:

based on the V4 lead, a section from the end point of the T wave to the starting point of the adjacent backward P wave is called a T-P section;

(1) calculating two adjacent T-P sections from the merging position of the two original electrocardiosignals forwards and backwards respectively;

(2) respectively calculating the number m and n of points of two adjacent T-P sections, and taking the average value

(3) Taking points backwards from the nearest T wave terminal point before the merging position, wherein the number of the points isObtaining a sequence A;

taking points forward from the nearest P wave starting point after the merging position, wherein the number of the points isObtaining a sequence B;

and (4) reversing the sequence of the number B to obtain a sequence C, and averaging corresponding positions of the sequence A and the sequence C to obtain a sequence D. The length of the array A, B, C, D isThe number series D is used to replace the values of the sample points between the end of the most recent T wave before the merge to the start of the most recent P wave after the merge.

It should be understood that the electrocardiographic signals recorded in the standardized XML document need to satisfy a certain time requirement, may be limited by the function of the electrocardiograph, and need to continuously acquire 2 or more electrocardiographic signals to generate 2 or more XML documents.

Illustratively, the S103: standardizing the extracted information;

in the extracted information, there are differences when the age, the acquisition duration, and the conventional 12-lead data and resolution information of the corresponding duration are stored in the XML documents of 3 electrocardiographic signals, as shown in table 1.

TABLE 1

Age information Length of acquisition Voltage resolution
Merrill R12 Is provided with 10s 1uV
Nippon SE-12 Is free of 20s 2.52uV
Nalong RAGE-12 Is provided with 20s 1uV

The normalization process is as follows:

when there is a loss of age information, the age is set to a default value of 0 when the normalization process is a loss.

The XML document generated by the Meyer R12 electrocardiograph only stores electrocardiogram data of 10s, and the electrocardiogram data is measured twice continuously when the electrocardiograph is used for measurement, so that XML documents corresponding to the electrocardiogram data which are measured continuously need to be combined, and the standardization process is to adopt a certain strategy to combine 12-lead data stored in the second XML document after 12-lead data stored in the first XML document and modify the acquisition time.

The merging strategy is as follows: the merging strategy is as follows: the segment from the end of the T wave to the beginning of the immediately following backward P wave, based on the V4 lead, is hereinafter referred to as the T-P segment. Firstly, respectively calculating 2 adjacent T-P sections from the combination position of electrocardiosignals forwards and backwards; secondly, respectively calculating the number of points of each T-P section, and taking an average value; thirdly, points are taken backwards from the latest T wave end point before the merging position and points are taken forwards from the latest P wave start point after the merging position, the number of the points taken is the average value calculated in the second step, the average value is taken from the two corresponding values of the taken points, and the sampling point from the latest T wave end point before the merging position to the latest P wave start point after the merging position is replaced. Examples are shown in FIGS. 2(a) to 2(d) (taking the V4 lead as an example).

When the 3 electrocardiographs measure the electrocardio data, the resolution ratio is different, the standardization processing is that the resolution ratio is uniformly converted into 1uV within the acceptable error range, and then the 12-lead data, namely the sampling point numerical value, is recalculated according to the converted resolution ratio.

Further, the S104: designing a target XML document data structure; the method specifically comprises the following steps:

and designing a target XML document data structure according to the information required to be stored, and describing by using an XML Schema document.

A target XML document data structure comprising: patient basic information, electrocardiogram basic information, lead data and other information;

the patient basic information comprises: patient ID, name, gender, age and electrocardiogram automatic diagnosis;

the basic information of the electrocardiogram comprises: the method comprises the steps of (1) creating time of an electrocardiogram, sampling time, acquisition duration, resolution, a unit for describing time and a unit for describing potential;

the lead data, comprising: converting the sampling point numerical values of 12 leads after resolution;

the other information includes: verification code, measurement department and data source.

The XML document data structure shown in fig. 3 is designed, and is described by writing an XML Schema document by an XML Editor (Oxygen XML Editor 23.1), as shown in fig. 4.

Further, the step S105: filling information after the inspection coding and data standardization processing into a target XML document data structure to obtain a standardized electrocardiosignal XML document; the method specifically comprises the following steps:

and correspondingly storing the information after the inspection code and the data are standardized in a tag of the XML document, and storing the document after the XML Schema document passes the verification. The verification comprises: the order of the elements, the relationships between the elements and the attributes, the data formats of the elements and the attributes and the values of the two satisfy the constraints.

An empty XML document is generated from an XML Schema document using an XML Editor (Oxygen XML Editor 23.1). Reading an empty XML document, correspondingly storing information in a tag of the XML document, generating a new standardized electrocardiosignal XML document, and storing the document after the XML Schema document passes verification. And during verification, the standardized electrocardiosignal XML document is verified by using an XML Schema document.

It should be understood that the standardized XML document of the electrocardiograph signal has a simple and standard data structure, a small volume, high security and a uniform data format, and is convenient to read, store and transmit.

Example two

The embodiment provides an XML document standardization system for various electrocardiosignal storage;

an XML document standardization system for various electrocardiosignal storage comprises:

an acquisition module configured to: acquiring a plurality of original electrocardiosignals to be standardized; extracting information of each original electrocardiosignal to be standardized;

a verification module configured to: checking the extracted information to obtain a check code;

a normalization processing module configured to: carrying out data standardization processing on the extracted information;

a structural design module configured to: designing a target XML document data structure;

a fill module configured to: and filling the information after the check coding and data standardization processing into a target XML document data structure to obtain a standardized electrocardiosignal XML document.

It should be noted here that the above-mentioned obtaining module, verifying module, standardizing processing module, structural design module and filling module correspond to steps S101 to S105 in the first embodiment, and the above-mentioned modules are the same as the corresponding steps in the implementation example and application scenarios, but are not limited to the contents disclosed in the first embodiment. It should be noted that the modules described above as part of a system may be implemented in a computer system such as a set of computer-executable instructions.

In the foregoing embodiments, the descriptions of the embodiments have different emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.

The proposed system can be implemented in other ways. For example, the above-described system embodiments are merely illustrative, and for example, the division of the above-described modules is merely a logical division, and in actual implementation, there may be other divisions, for example, multiple modules may be combined or integrated into another system, or some features may be omitted, or not executed.

EXAMPLE III

The present embodiment also provides an electronic device, including: one or more processors, one or more memories, and one or more computer programs; wherein, a processor is connected with the memory, the one or more computer programs are stored in the memory, and when the electronic device runs, the processor executes the one or more computer programs stored in the memory, so as to make the electronic device execute the method according to the first embodiment.

It should be understood that in this embodiment, the processor may be a central processing unit CPU, and the processor may also be other general purpose processors, digital signal processors DSP, application specific integrated circuits ASIC, off-the-shelf programmable gate arrays FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and so on. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.

The memory may include both read-only memory and random access memory, and may provide instructions and data to the processor, and a portion of the memory may also include non-volatile random access memory. For example, the memory may also store device type information.

In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software.

The method in the first embodiment may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor. The software modules may be located in ram, flash, rom, prom, or eprom, registers, among other storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor. To avoid repetition, it is not described in detail here.

Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.

Example four

The present embodiments also provide a computer-readable storage medium for storing computer instructions, which when executed by a processor, perform the method of the first embodiment.

The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

14页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:图神经网络的预训练方法、训练方法、装置、设备及介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!