Method and device for storing electrocardiogram, medium and program product

By using ECG grid template objects and vector graphics technology to draw ECG waveforms in PDF files, the waste of central electrogram storage resources and image quality problems of traditional methods are solved, and efficient storage and clear image display are achieved.

CN119405326APending Publication Date: 2025-02-11纳龙健康科技股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411517603.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

Traditional electrocardiogram report generation methods insert electrocardiograms as pictures into PDF documents, resulting in wasted storage resources, and images are prone to blur or distortion during preview and printing, affecting diagnostic accuracy.

Method used

By drawing an ECG grid template object using the path object of the PDF application and embedding the template object in the PDF file, drawing the ECG waveform diagram in the form of a vector diagram, compressing the signal line path object into a binary stream and saving it into the PDF file.

Benefits of technology

Ensure high definition and distortion of the electrocardiogram during preview and printing, reduces the size of PDF files, optimizes the use of storage resources, and improves diagnostic efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119405326A_ABST
    Figure CN119405326A_ABST
Patent Text Reader

Abstract

The invention provides a method and device for storing an electrocardiogram, a medium and a program product, and the method comprises the steps: obtaining a reusable electrocardiogram grid template object through the drawing of a path object of a PDF application program according to the grid size of a template electrocardiogram; when the PDF file is generated, creating a reference of an electrocardiogram grid template object on each page of the PDF file; when an electrocardiogram PDF file of the electrocardiogram is generated, embedding an electrocardiogram grid template object into a corresponding page position through an external object reference mechanism; for each lead of the electrocardiogram, using a path object of a PDF application program to draw an electrocardiogram oscillogram of electrocardiogram data obtained through the lead in a vector diagram form on the electrocardiogram grid template object embedded into the corresponding page position, and obtaining a signal line path object; and compressing the signal line path object into a binary stream and storing the binary stream into an electrocardiogram PDF file. By utilizing the technical scheme, the volume of the PDF file can be greatly reduced, so that the storage efficiency of the PDF file is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a method, device, medium and program product for storing an electrocardiogram. Background Art

[0002] In the medical field, the acquisition and diagnosis of electrocardiograms is an important means for recording the electrical activity of the heart. Doctors rely on clear electrocardiograms to accurately diagnose heart conditions. In the field of remote diagnosis, electrocardiogram files not only need to be as small as possible to facilitate transmission, but also must ensure the highest possible image quality to support doctors in making accurate clinical decisions; and medical institutions also need to store a large amount of electrocardiogram data. The traditional method of generating electrocardiogram reports usually inserts the electrocardiogram as an image into a PDF document, but this method will lead to a waste of storage resources, especially when processing a large number of high-definition electrocardiograms, a single image may take up more than 2.5MB of space, making the entire PDF file bulky and affecting the efficiency of remote diagnosis; in addition, electrocardiograms stored in PDF in image format are prone to become blurred when enlarged and previewed, and may also be distorted due to resolution mismatch when printed, affecting the accuracy of diagnosis. Summary of the invention

[0003] The embodiments of the present invention provide a method, device, medium and program product for storing an electrocardiogram to ensure the clarity of the electrocardiogram during preview and printing and to ensure that the image is not distorted, while significantly reducing the size of the PDF file, thereby optimizing the use of storage resources and improving the storage efficiency of the PDF file.

[0004] In order to achieve the above object, on the one hand, a method for optimizing electrocardiogram storage and display is provided, the method comprising:

[0005] Step S1, according to a predetermined template electrocardiogram grid size, using a path object of a PDF application to draw and obtain a reusable electrocardiogram grid template object;

[0006] Step S2, when generating a PDF file, creating a reference to the electrocardiogram grid template object on each page of the PDF file;

[0007] Step S3, when generating an electrocardiogram PDF file of the electrocardiogram, embedding the electrocardiogram grid template object into a corresponding page position through an external object reference mechanism of a PDF application;

[0008] Step S4, for each lead of the electrocardiogram, using the path object of the PDF application to draw an electrocardiogram waveform diagram of the electrocardiogram data obtained through the lead in the form of a vector diagram on the electrocardiogram grid template object embedded in the corresponding page position, to obtain a signal line path object; the electrocardiogram waveform diagram includes the shape, amplitude and corresponding time interval information of the electrocardiogram wave;

[0009] Step S5, compressing the signal line path object into a binary stream and storing it in the electrocardiogram PDF file.

[0010] Preferably, the method for storing an electrocardiogram further comprises: compressing the electrocardiogram grid template object into a binary stream and storing the binary stream into a PDF application.

[0011] Preferably, in the method for storing an electrocardiogram, the electrocardiogram further includes: electrocardiogram information text, wherein the electrocardiogram information text includes: patient information, examination date and / or doctor's notes.

[0012] Preferably, the method for storing an electrocardiogram includes: using a path object of a PDF application to draw the electrocardiogram information text in the form of a vector diagram to obtain an electrocardiogram information text object; and compressing the electrocardiogram information text object into a binary stream and storing it in the electrocardiogram PDF file.

[0013] On the other hand, the present invention provides a device for storing an electrocardiogram, which includes a memory and a processor, wherein the memory stores at least one program, and the at least one program is executed by the processor to implement any of the methods for storing an electrocardiogram as described above.

[0014] On the other hand, the present invention provides a computer-readable storage medium, wherein the storage medium stores at least one program, and the at least one program is executed by a processor to implement any of the above methods for storing an electrocardiogram.

[0015] In yet another aspect, the present invention provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for storing an electrocardiogram as described above is implemented.

[0016] The above technical solution has the following technical effects:

[0017] The technical solution of the embodiment of the present invention obtains an electrocardiogram grid template object by drawing according to the grid size of the template electrocardiogram; when generating a PDF file, a reference to the electrocardiogram grid template object is created on each page of the PDF file; when generating the electrocardiogram PDF file of the electrocardiogram, the electrocardiogram grid template object is embedded in the corresponding page position; the path object of the PDF application is used to accurately draw the electrocardiogram waveform of the electrocardiogram data obtained from each lead of the electrocardiogram in the form of a vector diagram on the electrocardiogram grid template object embedded in the corresponding page position, thereby obtaining a signal line path object; the signal line path object is compressed into a binary stream and stored in the electrocardiogram PDF file, ensuring high clarity and no distortion of the electrocardiogram during preview and printing, solving the preview blur and print distortion problems caused by inserting the traditional electrocardiogram into PDF, and by storing the electrocardiogram grid as a reusable resource, the size of the PDF file is greatly reduced, the use of storage space is optimized, and it is more suitable for medical institutions and remote diagnosis scenarios that need to process a large number of electrocardiograms.

[0018] In a further embodiment, the ECG information text is drawn in the form of vector graphics using the path object of the PDF application. The ECG information text includes patient information, examination date and / or doctor's notes, etc., to obtain a high-quality ECG information text object, which is compressed into a binary stream and stored in the ECG PDF file, ensuring that the ECG information text remains clear and readable at any size, thereby improving the accuracy and efficiency of ECG reports in medical diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 A schematic flow chart of a method for storing an electrocardiogram according to an embodiment of the present invention;

[0020] Figure 2 A code example of a definition of an electrocardiogram grid template object in a PDF application in a specific implementation of a method for storing an electrocardiogram according to an embodiment of the present invention;

[0021] Figure 3 In a specific implementation of the method for storing an electrocardiogram according to an embodiment of the present invention, the hierarchical structure of an electrocardiogram PDF file and a code example corresponding to a selected level;

[0022] Figure 4 In a specific implementation of the method for storing an electrocardiogram according to an embodiment of the present invention, a code example of an electrocardiogram grid template object is included in the hierarchy of referenced resources on each page of the electrocardiogram PDF file;

[0023] Figure 5In a specific implementation of the method for storing an electrocardiogram according to an embodiment of the present invention, a code example of a pre-rendered electrocardiogram grid template object is included in the corresponding page content in the electrocardiogram PDF file;

[0024] Figure 6 FIG. 4 is a schematic diagram of a device for storing an electrocardiogram according to an embodiment of the present invention. DETAILED DESCRIPTION

[0025] To further illustrate the various embodiments, the present invention provides drawings. These drawings are part of the disclosure of the present invention, which are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, a person of ordinary skill in the art should be able to understand other possible implementations and advantages of the present invention. The components in the figures are not drawn to scale, and similar component symbols are generally used to represent similar components.

[0026] The present invention will now be further described with reference to the accompanying drawings and specific implementation methods.

[0027] Embodiment 1:

[0028] In order to ensure the clarity of the electrocardiogram during preview and printing and to ensure that the image is not distorted, while being able to significantly reduce the size of the PDF file, thereby optimizing the use of storage resources and further improving the storage efficiency of the PDF file, an embodiment of the present invention provides a method for storing an electrocardiogram. Figure 1 FIG. 1 is a flow chart of a method for storing an electrocardiogram according to an embodiment of the present invention. Figure 2 As shown, the method includes:

[0029] Step S1, according to a predetermined template electrocardiogram grid size, using a path object of a PDF application to draw and obtain a reusable electrocardiogram grid template object;

[0030] Step S2, when generating the PDF file, creating a reference to the electrocardiogram grid template object on each page of the PDF file;

[0031] Step S3, when generating an electrocardiogram PDF file of the electrocardiogram, embed the electrocardiogram grid template object into a corresponding page position through an external object reference mechanism of the PDF application;

[0032] Step S4, for each lead of the electrocardiogram, using the path object of the PDF application to draw an electrocardiogram waveform diagram of the electrocardiogram data obtained through the lead in the form of a vector diagram on the electrocardiogram grid template object embedded in the corresponding page position, to obtain a signal line path object; the electrocardiogram waveform diagram includes the shape, amplitude and corresponding time interval information of the electrocardiogram wave;

[0033] Step S5, compressing the signal line path object into a binary stream and storing it in the electrocardiogram PDF file.

[0034] Embodiment 2:

[0035] The embodiment of the present invention proposes a method of inserting an electrocardiogram into a PDF file in a manner similar to scalable vector graphics (SVG), which can ensure the clarity and non-distortion of the electrocardiogram when previewing and printing; at the same time, the reusable electrocardiogram grid template object in the template electrocardiogram is extracted and stored in the PDF file in the form of a resource object, which greatly reduces the waste of storage resources. The method of the embodiment of the present invention includes:

[0036] Step 1: According to the predetermined template electrocardiogram grid size, a reusable electrocardiogram grid template object is obtained by drawing using a path object of a PDF application. Preferably, the electrocardiogram grid template object is compressed into a binary stream and stored in a PDF file.

[0037] In a specific embodiment, firstly, an ECG grid template with universality and reusability is accurately extracted from a predetermined template ECG, then the ECG grid of the ECG grid template is accurately drawn using a path object of a PDF application, and the drawn ECG grid template object is compressed into a binary stream and stored in a PDF file. The path object of the PDF application allows us to define graphic elements in the form of vector graphics, which means that no matter how much the PDF document is enlarged or reduced, the lines of the ECG grid will remain clear and accurate.

[0038] Figure 2 This is a code example of defining an electrocardiogram grid template object in a PDF application in a specific implementation of a method for storing an electrocardiogram according to an embodiment of the present invention. Figure 2 As shown in the figure, the ECG grid template object is an external object (Form XObject). The ECG grid template object that can be reused in the template ECG only needs to be saved in the PDF file and reused as a template resource. When generating a new ECG report, this template can be directly called and the waveform can be drawn according to the actual ECG data, thus avoiding the repeated storage of the same grid information, greatly saving storage space and speeding up data processing.

[0039] Step 2: When generating a PDF file, create a reference to the ECG grid template object on each page of the PDF file.

[0040] In a specific embodiment, on each page of the PDF, a reference to the ECG grid template object is first created, which can be achieved by referencing the ECG grid template object created in step 1, thereby ensuring the consistency and accuracy of the ECG grid.

[0041] Step three, when generating the electrocardiogram PDF file of the electrocardiogram, the electrocardiogram grid template object is embedded into the corresponding page position through the external object reference mechanism of the PDF application.

[0042] In a specific embodiment, when generating each electrocardiogram PDF, the electrocardiogram grid template object is embedded into the corresponding page position through the external object reference mechanism of the PDF application. This method can not only reduce the workload of repeated grid drawing and improve the efficiency of data processing, but also keep the electrocardiogram document neat and consistent.

[0043] Figure 3 In a specific implementation of the method for storing an electrocardiogram according to an embodiment of the present invention, the hierarchical structure of an electrocardiogram PDF file and a code example corresponding to a selected level; and Figure 4 In a specific implementation of the method for storing an electrocardiogram according to an embodiment of the present invention, the hierarchical structure of the referenced resources on each page of the electrocardiogram PDF file includes a code example of an electrocardiogram grid template object. Figure 3 as well as Figure 4 As shown, there are 14 pages in the ECG PDF file, and each page references the ECG grid template object (Fm0) as a resource.

[0044] Figure 5 In a specific implementation of the method for storing an electrocardiogram according to an embodiment of the present invention, the corresponding page content in the electrocardiogram PDF file includes a code example of a pre-rendered electrocardiogram grid template object. Figure 5 As shown, the corresponding page content (Contents) of the electrocardiogram PDF file includes a pre-rendered electrocardiogram grid template object (Fm0).

[0045] Figures 2 to 5 The implementation codes are only exemplary. A person skilled in the art, knowing the concept of the present invention and without creative work, may have a variety of implementation methods.

[0046] Step 4: For each lead of the electrocardiogram, use the path object of the PDF application to draw the electrocardiogram waveform of the electrocardiogram data obtained through the lead in the form of a vector diagram on the electrocardiogram grid template object embedded in the corresponding page position to obtain a signal line path object.

[0047] Preferably, the ECG waveform diagram includes the shape, amplitude and corresponding time interval information of the ECG waves.

[0048] In a specific embodiment, the electrocardiogram information text of the electrocardiogram is drawn in the form of a vector diagram using a path object of a PDF application to obtain an electrocardiogram information text object; and the electrocardiogram information text object is compressed into a binary stream and stored in the electrocardiogram PDF file. Preferably, the electrocardiogram information text includes: patient information, examination date and / or doctor's notes.

[0049] In a specific embodiment, for each lead of the electrocardiogram, the drawing function of the PDF application, especially its powerful path object function, is used to accurately draw the electrocardiogram waveform of the electrocardiogram data obtained by the lead. These path objects strictly follow medical standards and can accurately reflect the key information such as the shape, amplitude and time interval of the electrocardiogram. Because they are vector graphics, no matter how much the electrocardiogram is magnified, these signal lines will remain smooth and without jagged edges, ensuring that doctors can clearly observe every subtle change;

[0050] In addition to the signal line path object, detailed ECG information text objects are added to the ECG document to mark patient information, examination date, doctor's notes and / or any important ECG-related data. These ECG information text objects are also drawn in the form of vector graphics, ensuring their clarity and readability when viewed in print or on an electronic screen. Preferably, the ECG information text objects are drawn with carefully designed fonts, sizes and colors to ensure the harmonious coexistence of the ECG information text information and the ECG data waveform, which does not affect the doctor's visual judgment and can provide necessary reference information.

[0051] Step 5: compress the signal line path object into a binary stream and save it into the ECG PDF file.

[0052] In a specific embodiment, based on the above technical solution, the following PDF file storage size comparison results before and after optimization can be obtained for the same electrocardiogram but different number of PDF files:

[0053] 2 pieces 5 10 sheets Before optimization 6.02M 14.9M 29.7M After optimization 275K 356K 495K

[0054] The technical solution of the embodiment of the present invention effectively solves the problems of storage, transmission and display of electrocardiograms. This method not only improves the display quality of electrocardiograms, but also optimizes the use of storage resources. It has important application value in many fields such as medical diagnosis, telemedicine, education and research.

[0055] Embodiment three:

[0056] The present invention also provides a device for storing electrocardiograms, such as Figure 6 As shown, the device includes a processor 601, a memory 602, a bus 603, and a computer program stored in the memory 602 and executable on the processor 601. The processor 601 includes one or more processing cores. The memory 602 is connected to the processor 601 via the bus 603. The memory 602 is used to store program instructions. When the processor executes the computer program, the steps in the above method embodiment of the first embodiment of the present invention are implemented.

[0057] Further, as an executable solution, the device for storing the electrocardiogram may be a computer unit, which may be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The computer unit may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the composition structure of the above-mentioned computer unit is merely an example of a computer unit and does not constitute a limitation on the computer unit, and may include more or less components than the above-mentioned, or a combination of certain components, or different components. For example, the computer unit may also include input and output devices, network access devices, buses, etc., which are not limited in the embodiments of the present invention.

[0058] Further, as an executable solution, the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the computer unit, and various interfaces and lines are used to connect the various parts of the entire computer unit.

[0059] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the computer unit by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application required for a function; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0060] Embodiment 4:

[0061] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method in the embodiment of the present invention are implemented.

[0062] If the module / unit integrated in the computer unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory) and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction.

[0063] Embodiment five:

[0064] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of the method described above are implemented.

[0065] Although the present invention has been specifically shown and described in conjunction with the preferred embodiments, it should be understood by those skilled in the art that various changes may be made to the present invention in form and details without departing from the spirit and scope of the present invention as defined by the appended claims, all of which are within the scope of protection of the present invention.

Claims

1. A method for storing an electrocardiogram, characterized in that: include: Step S1, according to a predetermined template electrocardiogram grid size, using a path object of a PDF application to draw and obtain a reusable electrocardiogram grid template object; Step S2, when generating a PDF file, creating a reference to the electrocardiogram grid template object on each page of the PDF file; Step S3, when generating an electrocardiogram PDF file of the electrocardiogram, embedding the electrocardiogram grid template object into a corresponding page position through an external object reference mechanism of a PDF application; Step S4, for each lead of the electrocardiogram, using the path object of the PDF application to draw an electrocardiogram waveform diagram of the electrocardiogram data obtained through the lead in the form of a vector diagram on the electrocardiogram grid template object embedded in the corresponding page position, to obtain a signal line path object; the electrocardiogram waveform diagram includes the shape, amplitude and corresponding time interval information of the electrocardiogram wave; Step S5, compressing the signal line path object into a binary stream and storing it in the electrocardiogram PDF file.

2. The method for storing an electrocardiogram according to claim 1, characterized in that: Also includes: The electrocardiogram grid template object is compressed into a binary stream and stored in a PDF file.

3. The method for storing an electrocardiogram according to claim 1, characterized in that: The electrocardiogram further includes: electrocardiogram information text, wherein the electrocardiogram information text includes: patient information, examination date and / or doctor's notes.

4. The method for storing an electrocardiogram according to claim 3, characterized in that: include: Draw the electrocardiogram information text in the form of a vector graph using a path object of a PDF application to obtain an electrocardiogram information text object; The electrocardiogram information text object is compressed into a binary stream and stored in the electrocardiogram PDF file.

5. A device for storing an electrocardiogram, characterized in that: The method comprises a memory and a processor, wherein the memory stores at least one program, and the at least one program is executed by the processor to implement the method for storing an electrocardiogram according to any one of claims 1 to 4.

6. A computer-readable storage medium, characterized in that: The storage medium stores at least one program, and the at least one program is executed by a processor to implement the method for storing an electrocardiogram as described in any one of claims 1 to 4.

7. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for storing an electrocardiogram according to any one of claims 1 to 4 is implemented.