Electrocardiogram processing method and device
By automatically generating multiple real-time updated ECG scatter plots in the ECG monitoring system, the problem that traditional systems cannot actively draw multiple ECG scatter plots is solved, reducing operation difficulty and improving analysis efficiency.
Patent Information
- Application Number
- CN202211174633.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-26
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2042-09-26
AI Technical Summary
Traditional electrocardiogram monitoring systems are unable to actively draw multiple electrocardiogram scatter plots, which leads to the doctor on duty requiring manual operations to obtain comprehensive analysis information, which increases the difficulty of operation and inefficiency of analysis.
By receiving the electrocardiogram, R point detection, R-R interim statistics and interim difference value statistics are performed, and three types of real-time updated scatter plots (interim scatter plot, time interim scatter plot, and interim difference value scatter plot) are automatically generated, and two statistical forms of single-time and full-time periods are provided for each type of scatter plot.
It realizes the provision of real-time electrocardiograms of multiple types and multi-tenes to users, reducing the operation difficulty of duty personnel and improving the analysis and monitoring efficiency of remote electrocardiograms.
Smart Images

Figure CN115391743B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to an electrocardiogram scattergram processing method and device. Background Art
[0002] Most medical institutions are equipped with remote ECG monitoring systems, which are generally composed of a front-end acquisition terminal and a back-end server terminal; the front-end acquisition terminal is used to collect ECG signals from designated objects and send the collected signals to the back-end server terminal; the back-end server terminal is used to display the received ECG signals and analyze the heartbeat status and display the analysis results. Traditional servers rarely actively draw ECG scatter plots during signal analysis, and even if they do, they can only give Lorenz ECG scatter plots (also called RR interval scatter plots and interval scatter plots). If the doctor on duty wants to analyze the Lorenz ECG scatter plot, RR-t time interval scatter plot (also called time interval scatter plot) and four-quadrant difference scatter plot (also called interval difference scatter plot), he needs to manually operate on the server terminal to obtain the other two scatter plots. Summary of the invention
[0003] The purpose of the present invention is to provide an ECG scatter plot processing method, device, electronic device and computer-readable storage medium to address the defects of the prior art, perform R point detection on the received ECG signal to obtain the corresponding R point sequence, perform RR interval statistics on the R point sequence to obtain the corresponding RR interval sequence, and perform interval difference statistics on the RR interval sequence to obtain the corresponding interval difference sequence; and automatically generate three types of real-time updated scatter plots (interval scatter plot, time interval scatter plot, interval difference scatter plot) based on the interval sequence and the interval difference sequence; and provide two statistical forms of single time period and full time period for each type of scatter plot. Through the present invention, users can be provided with multi-type and multi-temporal real-time ECG scatter plots, thereby making up for the defect that the conventional service end cannot actively draw a variety of ECG scatter plots, reducing the difficulty of operation for on-duty personnel, and improving the efficiency of remote ECG analysis and monitoring.
[0004] To achieve the above object, a first aspect of an embodiment of the present invention provides an electrocardiogram scattergram processing method, the method comprising:
[0005] The server receives a first connection request sent by the acquisition end;
[0006] Verifying the acquisition end according to the first connection request, and constructing a corresponding first interval scatter plot, a first time interval scatter plot, a first interval difference scatter plot, a second interval scatter plot, a second time interval scatter plot, and a second interval difference scatter plot for the acquisition end when the verification succeeds, and allocating a corresponding first data channel and a first channel file to the acquisition end, and intercepting the acquisition end on the first data channel;
[0007] When the data acquisition end is completed once in the first data channel, the data received this time is used as the corresponding first ECG data packet; and a first ECG signal and a first timestamp are extracted from the first ECG data packet;
[0008] Performing R point detection on the first electrocardiogram signal to generate a corresponding first R point sequence, performing RR interval statistics on the first R point sequence to generate a corresponding first interval sequence, and performing RR interval difference statistics on the first interval sequence to generate a corresponding first interval difference sequence;
[0009] A corresponding first acquisition record is composed of the first timestamp, the first interval sequence and the first interval difference sequence; and the first acquisition record is stored in a specified position in the first channel file in chronological order; if the adding position of the first acquisition record in the first channel file is the end of the file, whether the hour information of the first timestamp of the last two acquisition records in the first channel file matches is confirmed, and if they do not match, a new set of the first interval scatter plot, the first time interval scatter plot and the first interval difference scatter plot is constructed, and a corresponding hour time period information is assigned to the set of new scatter plots based on the hour information of the first timestamp;
[0010] The first interval scatter plot, the first time interval scatter plot and the first interval difference scatter plot are updated according to the first timestamp, the first interval sequence and the first interval difference sequence; and the second interval scatter plot, the second time interval scatter plot and the second interval difference scatter plot are updated according to the first interval sequence and the first interval difference sequence.
[0011] Preferably, the verifying the acquisition end according to the first connection request, and constructing a corresponding first interval scatter plot, a first time interval scatter plot, a first interval difference scatter plot, a second interval scatter plot, a second time interval scatter plot, and a second interval difference scatter plot for the acquisition end when the verification succeeds, and allocating a corresponding first data channel and a first channel file to the acquisition end, and monitoring the acquisition end on the first data channel, specifically includes:
[0012] Extract the first acquisition terminal identifier from the first connection request; query the local registered acquisition terminal list according to the first acquisition terminal identifier, and record the registered acquisition terminal record whose acquisition terminal identifier field in the registered acquisition terminal list matches the first acquisition terminal identifier as the corresponding matching record; if the matching record is not empty, set the first verification result to successful verification, otherwise set the first verification result to failed verification; the registered acquisition terminal list includes a plurality of registered acquisition terminal records; the registered acquisition terminal record includes the acquisition terminal identifier field, the acquisition terminal name field, the acquisition terminal MAC code field, the acquisition terminal manufacturer field, the acquisition terminal model field and the acquisition terminal registration time field;
[0013] When the first verification result is successful verification, two single-quadrant two-dimensional lorenz scatter plots with RR interval as horizontal and vertical axes are constructed as the corresponding first and second interval scatter plots; and two single-quadrant two-dimensional scatter plots with time as the horizontal axis and RR interval as the vertical axis are constructed as the corresponding first and second time interval scatter plots, and the horizontal axis time length of the first time interval scatter plot is set to one hour, and the horizontal axis time length of the second time interval scatter plot is set to twenty-four hours; and two four-quadrant two-dimensional scatter plots with RR interval difference as horizontal and vertical axes are constructed as the corresponding first and second interval difference scatter plots; and based on the hourly period of the current time, a corresponding hourly period information is assigned to the first interval scatter plot, the first time interval scatter plot and the first interval difference scatter plot;
[0014] and allocating a data receiving channel to the acquisition end as the corresponding first data channel; and allocating a collection record storage file to the acquisition end as the corresponding first channel file, and initializing the first channel file to be empty;
[0015] And send the first request receipt carrying the connection success information back to the acquisition end; and continuously monitor the sending data of the acquisition end on the first data channel.
[0016] Preferably, performing R point detection on the first electrocardiogram signal to generate a corresponding first R point sequence, performing RR interval statistics on the first R point sequence to generate a corresponding first interval sequence, and performing RR interval difference statistics on the first interval sequence to generate a corresponding first interval difference sequence, specifically includes:
[0017] Setting the starting time of the first electrocardiogram signal as the first timestamp;
[0018] Perform QRS wave group detection on the first electrocardiogram signal to obtain multiple first QRS wave groups; perform R point identification on each of the first QRS wave groups to generate a corresponding first R point; extract the time interval of each of the first R points relative to the starting point of the first electrocardiogram signal to generate a corresponding first R point offset duration; and set the absolute time of each of the first R points according to the sum of the first timestamp and the first R point offset duration and record it as the corresponding first R point time t i , i is a positive integer; and for all the first R point times t i Generate the corresponding first R point sequence in chronological order;
[0019] For any two adjacent first R points in the first R point sequence, the time t i ,t i+1 Perform absolute difference calculation to generate the corresponding first interval d j , d j =|t i=j+1 -t i=j |, j is a positive integer, || is an absolute value operator; and all the first intervals d j Generate the corresponding first interval sequence in chronological order; the first interval d j The time point is the same as the first R point time t i=j+1 correspond;
[0020] For any two adjacent first intervals d in the first interval sequence j ,d j+1 Perform difference calculation to generate the corresponding first interval difference s k ,s k =(d j=k+1 -d j=k ), k is a positive integer; and all the first interval differences s are obtained k Generate the corresponding first interval difference sequence in chronological order; the first interval difference s k The time point is the same as the first R point time t i=k+2 correspond.
[0021] Preferably, storing the first acquisition record in a specified position in the first channel file in chronological order specifically includes:
[0022] Recording the first acquisition record currently to be saved as a new acquisition record, and recording the first timestamp of the new acquisition record as a new record timestamp; recording each acquisition record currently stored in the first channel file as an old acquisition record, and extracting the first timestamp of the last old acquisition record to generate a corresponding end timestamp;
[0023] If the timestamp of the new record is later than the end timestamp, then adding the new acquisition record to the end of the first channel file and saving it;
[0024] If the timestamp of the new record is earlier than the end timestamp, the old acquisition record corresponding to the first timestamp that is later than the timestamp of the new record in the first channel file is recorded as the first record; and the previous old acquisition record of the first record is recorded as the second record; and the new acquisition record is inserted between the second record and the first record and saved.
[0025] Preferably, updating the first interval scatter plot, the first time interval scatter plot and the first interval difference scatter plot according to the first timestamp, the first interval sequence and the first interval difference sequence specifically includes:
[0026] Extracting the hour information of the first timestamp as current hour period information;
[0027] and taking a set of the first interval scatter plot, the first time interval scatter plot and the first interval difference scatter plot corresponding to the current hour period information as the current interval scatter plot, the current time interval scatter plot and the current interval difference scatter plot;
[0028] The first interval d of the first interval sequence j Perform polling; and set the first interval d of the current polling j As the corresponding horizontal coordinate x1, the next first interval d j+1 as the corresponding ordinate y1; and the abscissa x1 and the ordinate y1 form the corresponding current discrete point coordinates (x1, y1); and perform discrete point tracing on the points corresponding to the current discrete point coordinates (x1, y1) on the current interval scatter plot; and the first interval d of the current polling j Is it the second to last first period? Confirm. If not, continue to the next first period d j+1 Conduct polling, if yes, end polling;
[0029] The first interval d of the first interval sequence j Perform polling; and set the first interval d of the current polling j The current interval d j ; and the current interval d j The corresponding first R point time t i=j+1 As the corresponding horizontal coordinate x2, the current interval d jas the corresponding ordinate y2; and the abscissa x2 and the ordinate y2 form the corresponding current discrete point coordinates (x2, y2); and perform discrete point tracing on the points corresponding to the current discrete point coordinates (x2, y2) on the current time interval scatter plot; and calculate the current interval d j Is it the last first period? Confirm, if not, continue to the next first period d j+1 Conduct polling, if yes, end polling;
[0030] The first interval difference value s of the first interval difference value sequence k Polling; and the first interval difference s of the current polling k As the corresponding horizontal coordinate x3, the next first interval difference s k+1 as the corresponding ordinate y3; and the abscissa x3 and the ordinate y3 form the corresponding current discrete point coordinates (x3, y3); and perform discrete point plotting on the points corresponding to the current discrete point coordinates (x3, y3) on the current interval difference scatter plot; and the first interval difference s of the current polling k Is it the second to last first interval difference? Confirm it. If not, continue to check the next first interval difference s k+1 Perform polling, and if yes, end polling.
[0031] Preferably, updating the second interval scatter plot, the second time interval scatter plot and the second interval difference scatter plot according to the first interval sequence and the first interval difference sequence specifically includes:
[0032] The first interval d of the first interval sequence j Perform polling; and set the first interval d of the current polling j As the corresponding horizontal coordinate x4, the next first interval d j+1 as the corresponding ordinate y4; and the abscissa x4 and the ordinate y4 form the corresponding current discrete point coordinates (x4, y4); and perform discrete point tracing on the points corresponding to the current discrete point coordinates (x4, y4) on the second interval scatter plot; and perform discrete point tracing on the first interval d of the current polling j Is it the second to last first period? Confirm. If not, continue to the next first period d j+1 Conduct polling, if yes, end polling;
[0033] The first interval d of the first interval sequence j Perform polling; and set the first interval d of the current polling j The current interval d j ; and the current interval dj The corresponding first R point time t i=j+1 As the corresponding horizontal coordinate x5, the current interval d j as the corresponding ordinate y5; and the abscissa x5 and the ordinate y5 form the corresponding current discrete point coordinate (x5, y5); and perform discrete point plotting on the point corresponding to the current discrete point coordinate (x5, y5) on the second time interval scatter plot; and j Is it the last first period? Confirm, if not, continue to the next first period d j+1 Conduct polling, if yes, end polling;
[0034] The first interval difference value s of the first interval difference value sequence k Polling; and the first interval difference s of the current polling k As the corresponding horizontal coordinate x6, the next first interval difference s k+1 as the corresponding ordinate y6; and the abscissa x6 and the ordinate y6 form the corresponding current discrete point coordinates (x6, y6); and perform discrete point plotting on the points corresponding to the current discrete point coordinates (x6, y6) on the second interval difference scatter plot; and the first interval difference s of the current polling k Is it the second to last first interval difference? Confirm it. If not, continue to check the next first interval difference s k+1 Perform polling, and if yes, end polling.
[0035] Preferably, the method further comprises:
[0036] Before starting the remote transmission of the ECG signal, the acquisition end sends the first connection request carrying the first acquisition end identifier stored locally to the server end; and receives the first request receipt sent back by the server end; and confirms whether there is connection success information in the first request receipt; if it is confirmed that there is, real-time ECG signal acquisition and processing is performed according to a preset signal acquisition frequency;
[0037] During the acquisition process, each time a signal acquisition of a specified time period is completed, a corresponding first ECG signal is generated; and the start acquisition time of the first ECG signal is used as the corresponding first timestamp; and the first ECG signal and the first timestamp form a corresponding first ECG data packet; and the first ECG data packet is sent to the server;
[0038] When sending the first ECG data packet, if a network failure occurs resulting in data transmission failure, the first ECG data packet that failed to be sent will be stored in a local unsent data queue; and after the network failure is resolved and the connection is reestablished with the server, one or more of the first ECG data packets in the unsent data queue will be resent one by one according to the first-in-first-out principle.
[0039] A second aspect of the embodiment of the present invention provides a device for implementing the method described in the first aspect, wherein the device is connected to a collection end; the device comprises: a data receiving module, a first data preprocessing module, a second data preprocessing module and a scatter plot processing module;
[0040] The data receiving module is used to receive a first connection request sent by the acquisition end; and verify the acquisition end according to the first connection request, and when the verification is successful, construct a corresponding first interval scatter plot, a first time interval scatter plot, a first interval difference scatter plot, a second interval scatter plot, a second time interval scatter plot, and a second interval difference scatter plot for the acquisition end, and allocate a corresponding first data channel and a first channel file to the acquisition end, and monitor the acquisition end on the first data channel;
[0041] The first data preprocessing module is used to, when completing a data reception of the acquisition end on the first data channel, use the data received this time as the corresponding first ECG data packet; and extract the first ECG signal and the first timestamp from the first ECG data packet; and perform R point detection on the first ECG signal to generate a corresponding first R point sequence, and perform RR interval statistics on the first R point sequence to generate a corresponding first interval sequence, and perform RR interval difference statistics on the first interval sequence to generate a corresponding first interval difference sequence;
[0042] The second data preprocessing module is used to form a corresponding first acquisition record from the first timestamp, the first interval sequence and the first interval difference sequence; and store the first acquisition record in a specified position in the first channel file in chronological order; if the adding position of the first acquisition record in the first channel file is the end of the file, confirm whether the hour information of the first timestamp of the last two acquisition records in the first channel file matches, and if they do not match, construct a new set of the first interval scatter plot, the first time interval scatter plot and the first interval difference scatter plot, and assign a corresponding hour time period information to the set of new scatter plots based on the hour information of the first timestamp;
[0043] The scatter plot processing module is used to update the first interval scatter plot, the first time interval scatter plot and the first interval difference scatter plot according to the first timestamp, the first interval sequence and the first interval difference sequence; and update the second interval scatter plot, the second time interval scatter plot and the second interval difference scatter plot according to the first interval sequence and the first interval difference sequence;
[0044] The acquisition end is used to send the first connection request carrying the locally stored first acquisition end identifier to the device before starting the remote transmission of the ECG signal; and receive the first request receipt sent back by the device; and confirm whether there is connection success information in the first request receipt; if it is confirmed to exist, real-time ECG signal acquisition and processing are performed according to the preset signal acquisition frequency; during the acquisition process, a corresponding first ECG signal is generated every time a signal acquisition of a specified duration is completed; and the start acquisition time of the first ECG signal is used as the corresponding first timestamp; and the first ECG signal and the first timestamp form a corresponding first ECG data packet; and the first ECG data packet is sent to the device; when sending the first ECG data packet, if a network failure occurs and causes data transmission failure, the first ECG data packet that failed to be sent at that time will be stored in the local unsent data queue; and after the network failure is resolved and the connection with the device is reestablished, one or more of the first ECG data packets in the unsent data queue will be reissued one by one according to the first-in-first-out principle.
[0045] A third aspect of an embodiment of the present invention provides an electronic device, including: a memory, a processor, and a transceiver;
[0046] The processor is used to be coupled to the memory, read and execute instructions in the memory, so as to implement the method steps described in the first aspect above;
[0047] The transceiver is coupled to the processor, and the processor controls the transceiver to send and receive messages.
[0048] A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions. When the computer instructions are executed by a computer, the computer executes the instructions of the method described in the first aspect above.
[0049] The embodiment of the present invention provides an electrocardiogram scatter plot processing method, device, electronic device and computer-readable storage medium, which performs R point detection on the received electrocardiogram signal to obtain the corresponding R point sequence, performs RR interval statistics on the R point sequence to obtain the corresponding RR interval sequence, and performs interval difference statistics on the RR interval sequence to obtain the corresponding interval difference sequence; and automatically generates three types of real-time updated scatter plots (interval scatter plot, time interval scatter plot, interval difference scatter plot) based on the interval sequence and the interval difference sequence; and provides two statistical forms of single time period and full time period for each type of scatter plot. Through the present invention, users can be provided with multi-type and multi-temporal real-time electrocardiogram scatter plots, thereby making up for the defect that the conventional service end cannot actively draw a variety of electrocardiogram scatter plots, reducing the difficulty of operation for the on-duty personnel, and improving the efficiency of remote electrocardiogram analysis and monitoring. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 A schematic diagram of an electrocardiogram scattergram processing method provided in Embodiment 1 of the present invention;
[0051] Figure 2 A module structure diagram of an electrocardiogram processing device provided in Embodiment 2 of the present invention;
[0052] Figure 3 A schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0054] The service end of the remote ECG monitoring system uses an ECG scatter plot processing method provided by the first embodiment of the present invention to perform R point detection on the ECG signal sent by the acquisition end to obtain a corresponding R point sequence, perform RR interval statistics on the R point sequence to obtain a corresponding RR interval sequence, perform interval difference statistics on the RR interval sequence to obtain a corresponding interval difference sequence, and automatically generate three types of real-time updated scatter plots (interval scatter plot, time interval scatter plot, interval difference scatter plot) based on the interval sequence and the interval difference sequence, and provide two statistical forms of single time period and full time period for each type of scatter plot; thereby solving the problem that the original system cannot actively draw a variety of real-time ECG scatter plots, reducing the operating difficulty of the on-duty personnel, and improving the analysis and monitoring efficiency of remote ECG; Figure 1 A schematic diagram of an electrocardiogram processing method provided in Embodiment 1 of the present invention is shown in FIG. Figure 1As shown, this method mainly includes the following steps:
[0055] Step 1: The server receives a first connection request sent by the acquisition end.
[0056] Here, the structure of the remote ECG monitoring system mentioned in the embodiment of the present invention is composed of a front-end acquisition terminal and a back-end service terminal; the front-end acquisition terminal is used to collect ECG signals of a specified object and send the collected signals to the back-end service terminal; the back-end service terminal is used to display the received ECG signals and analyze the heartbeat state and display the analysis results. The acquisition terminal is a signal acquisition device, equipment or instrument with an ECG signal acquisition function, such as a mobile phone, mobile terminal, PAD or computer that can be connected to an ECG acquisition patch, and special equipment such as an ECG machine, a handheld ECG acquisition instrument, a bedside monitor, etc. The service terminal is a remote service terminal with an ECG signal analysis function, such as a remote server, a cloud platform or a microservice interface. The acquisition terminal has completed the acquisition terminal registration in advance at the service terminal, and the service terminal saves all registered acquisition terminal information in the registered acquisition terminal list, and the acquisition terminal saves its own registered terminal identification information, that is, the first acquisition terminal identification, locally.
[0057] Before starting the remote transmission of the ECG signal, the acquisition end sends a first connection request carrying the first acquisition end identifier stored locally to the server end, and waits for the receipt sent back by the server end. After receiving the first connection request, the server end proceeds to the subsequent step 2 for connection processing.
[0058] Step 2, verifying the acquisition end according to the first connection request, and constructing corresponding first interval scatter plots, first time interval scatter plots, first interval difference scatter plots, second interval scatter plots, second time interval scatter plots, and second interval difference scatter plots for the acquisition end when the verification succeeds, and allocating corresponding first data channels and first channel files to the acquisition end, and monitoring the acquisition end on the first data channel;
[0059] Specifically, it includes: step 21, extracting the first acquisition terminal identifier from the first connection request; and searching the local registered acquisition terminal list according to the first acquisition terminal identifier, recording the registered acquisition terminal record whose acquisition terminal identifier field in the registered acquisition terminal list matches the first acquisition terminal identifier as the corresponding matching record; if the matching record is not empty, setting the first verification result to verification success, otherwise setting the first verification result to verification failure;
[0060] The registered acquisition terminal list includes multiple registered acquisition terminal records; the registered acquisition terminal record includes an acquisition terminal identification field, an acquisition terminal name field, an acquisition terminal MAC code field, an acquisition terminal manufacturer field, an acquisition terminal model field, and an acquisition terminal registration time field;
[0061] Here, each registered collecting terminal record in the registered collecting terminal list corresponds to a collecting terminal, and the collecting terminal identification field, collecting terminal name field, collecting terminal MAC code field, collecting terminal manufacturer field, collecting terminal model field and collecting terminal registration time field store the terminal identification, terminal name, MAC code, manufacturer name, terminal model and terminal registration time of the corresponding collecting terminal; the server queries the registered collecting terminal list according to the first collecting terminal identification, if there is no matching record in the table, the matching record is empty, otherwise it is not empty; if the matching record is empty, it means that the current collecting terminal is a non-registered terminal and the corresponding first verification result is verification failure, otherwise it means that the current collecting terminal is a registered terminal and the corresponding first verification result is verification success;
[0062] Step 22, when the first verification result is successful verification, construct two single-quadrant two-dimensional lorenz scatter plots with RR interval as horizontal and vertical axes as corresponding first and second interval scatter plots; and construct two single-quadrant two-dimensional scatter plots with time as horizontal axis and RR interval as vertical axis as corresponding first and second time interval scatter plots, and set the horizontal axis time length of the first time interval scatter plot to one hour, and set the horizontal axis time length of the second time interval scatter plot to twenty-four hours; and construct two four-quadrant two-dimensional scatter plots with RR interval difference as horizontal and vertical axes as corresponding first and second interval difference scatter plots; and assign a corresponding hourly time period information to the first interval scatter plot, the first time interval scatter plot and the first interval difference scatter plot based on the hourly time period of the current time;
[0063] Here, the interval scatter plot (Lorenz scatter plot), time interval scatter plot, and interval difference scatter plot are all public ECG scatter plot structures, and the construction method is as above, so I will not go into details here;
[0064] It should be noted that the embodiment of the present invention provides two temporal states, single period and full period, for each type of scatter plot (interval scatter plot, time interval scatter plot, interval difference scatter plot); the single period here refers to every hour, and a group (first interval scatter plot, first time interval scatter plot and first interval difference scatter plot) will be generated for each single period, that is, there are as many groups (first interval scatter plot, first time interval scatter plot and first interval difference scatter plot) as the hour span of the final monitoring time. For example, the acquisition end starts to collect from 5:20 pm to 8:20 pm, and the hour span during this period is 5-8, then 4 groups (first interval scatter plot, first time interval scatter plot and first interval difference scatter plot) should be obtained accordingly, and the 4 hour time period information corresponding to these 4 groups of scatter plots are: 5, 6, 7, 8 respectively; the full period here refers to 24 hours, and the three types of scatter plots corresponding to the full period are the second interval scatter plot, the second time interval scatter plot and the second interval difference scatter plot;
[0065] Step 23, a data receiving channel is allocated to the acquisition end as the corresponding first data channel; and an acquisition record storage file is allocated to the acquisition end as the corresponding first channel file, and the first channel file is initialized to empty;
[0066] Here, it can be known from the subsequent steps that the first channel file is a data file used to store and back up all acquisition records (first timestamp + first interval sequence + first interval difference sequence); the acquisition records in the first channel file are stored in chronological order, the first acquisition record is the earliest record, and the last acquisition record is the latest record;
[0067] Step 24, and send the first request receipt carrying the connection success information back to the acquisition end; and continuously monitor the data sent by the acquisition end on the first data channel.
[0068] Here, after successfully connecting to the acquisition end, the server will continue to receive the data sent by the acquisition end.
[0069] The processing flow of receiving the first request receipt on the collection end side is as follows:
[0070] The acquisition end receives the first request receipt sent back by the server; and confirms whether there is connection success information in the first request receipt; if it is confirmed to exist, real-time ECG signal acquisition and processing are performed according to the preset signal acquisition frequency; during the acquisition process, a corresponding first ECG signal is generated each time a signal acquisition of a specified duration is completed; and the start acquisition time of the first ECG signal is used as the corresponding first timestamp; and the first ECG signal and the first timestamp form a corresponding first ECG data packet; and the first ECG data packet is sent to the server; when sending the first ECG data packet, if a network failure occurs and causes data transmission failure, the first ECG data packet that failed to be sent is stored in the local unsent data queue; and after the network failure is resolved and the connection is reestablished with the server, one or more first ECG data packets in the unsent data queue are reissued one by one according to the first-in-first-out principle.
[0071] By combining the above processing flow of the acquisition end after receiving the first request receipt with the processing flow of the acquisition end before starting the remote transmission of the ECG signal in the previous text, the overall processing process of the acquisition end in the embodiment of the present invention can be obtained as follows:
[0072] Before starting the remote transmission of the ECG signal, the acquisition end sends a first connection request carrying the locally stored first acquisition end identifier to the server end; and receives the first request receipt sent back by the server end; and confirms whether there is connection success information in the first request receipt; if it is confirmed to exist, real-time ECG signal acquisition and processing is performed according to the preset signal acquisition frequency; during the acquisition process, a corresponding first ECG signal is generated each time a signal acquisition of a specified duration is completed; and the start acquisition time of the first ECG signal is used as the corresponding first timestamp; and the first ECG signal and the first timestamp form a corresponding first ECG data packet; and the first ECG data packet is sent to the server end; when sending the first ECG data packet, if a network failure occurs and causes data transmission failure, the first ECG data packet that failed to be sent at that time is stored in the local unsent data queue; and after the network failure is resolved and the connection is reestablished with the server end, one or more first ECG data packets in the unsent data queue are reissued one by one according to the first-in-first-out principle.
[0073] Here, the data resending mechanism of the collection end in the embodiment of the present invention ensures the integrity of the back-end collection data.
[0074] Step 3: When the data receiving end is completed once in the first data channel, the data received this time is used as the corresponding first ECG data packet; and the first ECG signal and the first timestamp are extracted from the first ECG data packet.
[0075] Step 4, performing R point detection on the first electrocardiogram signal to generate a corresponding first R point sequence, performing RR interval statistics on the first R point sequence to generate a corresponding first interval sequence, and performing RR interval difference statistics on the first interval sequence to generate a corresponding first interval difference sequence;
[0076] Specifically comprising: step 41, setting the starting time of the first electrocardiogram signal as a first timestamp;
[0077] Step 42, perform QRS wave group detection on the first ECG signal to obtain multiple first QRS wave groups; perform R point identification on each first QRS wave group to generate a corresponding first R point; extract the time interval of each first R point relative to the starting point of the first ECG signal to generate a corresponding first R point offset time length; and set the absolute time of each first R point according to the sum of the first timestamp and the first R point offset time length and record it as the corresponding first R point time t i , i is a positive integer; and for all the first R point times t i Generate the corresponding first R point sequence in chronological order;
[0078] Here, the QRS complex is a typical wave group in the ECG signal. The QRS complex consists of three sub-waveforms: Q, R, and S. The peak point of the R wave is the R point, and the time interval between two adjacent R points, that is, the RR interval, can be regarded as the duration of a heartbeat.
[0079] For example, the first timestamp of the first ECG signal is 2022-02-01 8:20:20, the time length of the first ECG signal is 36 seconds, and the first ECG signal is subjected to QRS wave group detection to obtain 30 first QRS wave groups, and then obtain 30 first R points R i and 30 first R point offset durations △l i , 1≤i≤30; because the first R point time t i = first timestamp + first R point offset duration △l i , then the first R point sequence finally obtained is: the first R point time t i=1 = first timestamp + first R point offset duration △l i=1 , the first R point time t i=2 = first timestamp + first R point offset duration △l i=2 , and so on, the first R point time t i=30 = first timestamp + first R point offset duration △l i=30 ;
[0080] Step 43: for any two adjacent first R points in the first R point sequence, i ,t i+1 Perform absolute difference calculation to generate the corresponding first interval d j , d j =|t i=j+1 -t i=j |, j is a positive integer, || is an absolute value operator; and all the first intervals d j Generate the corresponding first interval sequence in chronological order; the first interval d j The time point and the first R point time t i=j+1 correspond;
[0081] For example, the first R point sequence includes 30 first R points at time t i ,So,
[0082] d j=1 =|t i=2 -t i=1 |,d j=1 The time point is t i=2 ,
[0083] d j=2 =|t i=3 -t i=2 |,d j=2The time point is t i=3 ,
[0084] And so on.
[0085] d j=29 =|t i=30 -t i=29 |,d j=29 The time point is t i=30 ,
[0086] The first interval sequence thus obtained should include 29 first intervals d j ;
[0087] Step 44, for any two adjacent first intervals d in the first interval sequence j ,d j+1 Perform difference calculation to generate the corresponding first interval difference s k ,s k =(d j=k+1 -d j=k ), k is a positive integer; and all the first interval differences s are obtained k Generate the corresponding first interval difference sequence in chronological order; the first interval difference s k The time point and the first R point time t i=k+2 correspond.
[0088] For example, the first interval sequence should include 29 first intervals d j ,So,
[0089] s k=1 =(d j=2 -d j=1 ), s k=1 The time point is t i=3 ,
[0090] s k=2 =(d j=3 -d j=2 ), s k=2 The time point is t i=4 ,
[0091] And so on.
[0092] s k=28 =(d j=29 -d j=28 ), s k=28 The time point is t i=30 ,
[0093] The first interval difference sequence thus obtained should include 28 first interval difference values s k .
[0094] Step 5, a first acquisition record is formed by a first timestamp, a first interval sequence and a first interval difference sequence; and the first acquisition record is stored in a specified position in the first channel file in chronological order; if the adding position of the first acquisition record in the first channel file is the end of the file, whether the hour information of the first timestamps of the last two acquisition records in the first channel file matches is confirmed, and if they do not match, a new set of first interval scatter plots, first time interval scatter plots and first interval difference scatter plots are constructed, and a corresponding hour time period information is assigned to the set of new scatter plots based on the hour information of the first timestamp;
[0095] The step of storing the first acquisition record in a specified position in the first channel file in chronological order specifically includes:
[0096] Step A1, record the first acquisition record to be saved as a new acquisition record, and record the first timestamp of the new acquisition record as the new record timestamp; record each acquisition record currently stored in the first channel file as an old acquisition record, and extract the first timestamp of the last old acquisition record to generate a corresponding end timestamp;
[0097] Step A2: if the timestamp of the new record is later than the end timestamp, then the new acquisition record is added to the end of the first channel file and saved;
[0098] Step A3, if the timestamp of the new record is earlier than the end timestamp, the old acquisition record corresponding to the first timestamp later than the timestamp of the new record in the first channel file is recorded as the first record; and the previous old acquisition record of the first record is recorded as the second record; and the new acquisition record is inserted between the second record and the first record and saved.
[0099] Here, it can be known from the data retransmission mechanism of the acquisition end that the first ECG data packet received each time is not necessarily the latest first ECG data packet, that is, the first acquisition record generated each time is not necessarily the latest acquisition record;
[0100] When processing the first acquisition record to be stored in the designated position in the first channel file in chronological order, the first acquisition record is confirmed to be the latest acquisition record or a reissued acquisition record by judging the relationship between the first timestamp of the current first acquisition record and the timestamp of the last acquisition in the first channel file. Specifically: if the first timestamp of the current first acquisition record is later than the timestamp of the last acquisition in the first channel file, it means that the current first acquisition record is the latest acquisition record and it should be added to the end of the first channel file; if the first timestamp of the current first acquisition record is earlier than the timestamp of the last acquisition in the first channel file, it means that the current first acquisition record is a reissued acquisition record and it should be inserted into a specific position in the first channel file, the time of the previous acquisition record at the specific position should be earlier than the time of the current first acquisition record, and the time of the next acquisition record at the specific position should be later than the time of the current first acquisition record, that is, the next acquisition record at the specific position should be the first acquisition record later than the current first acquisition record;
[0101] After completing the record adding or inserting operation of the first channel file, if the adding position of the first acquisition record in the first channel file is the end of the file, it means that the current operation is a record adding operation, that is, the current first acquisition record is the latest acquisition record. At this time, by confirming the matching relationship of the hour information of the first timestamps of the last two acquisition records in the first channel file, it can be known whether the time of the latest acquisition record has crossed an hour period; for example, the hour information of the first timestamps of the last two acquisition records in the first channel file are 7 and 8 respectively, which means that the current time has crossed from 7 o'clock to 8 o'clock. Based on the design requirement of the embodiment of the present invention that a group of three types of scatter plots (first interval scatter plot, first time interval scatter plot and first interval difference scatter plot) need to be generated for each hour period, a new group of first interval scatter plots, first time interval scatter plots and first interval difference scatter plots should be constructed at this time, and a corresponding hour period information = 8 is assigned to this group of new three types of scatter plots.
[0102] Step 6, updating the first interval scatter plot, the first time interval scatter plot and the first interval difference scatter plot according to the first timestamp, the first interval sequence and the first interval difference sequence; and updating the second interval scatter plot, the second time interval scatter plot and the second interval difference scatter plot according to the first interval sequence and the first interval difference sequence;
[0103] Specifically, it includes: step 61, updating the first interval scatter plot, the first time interval scatter plot and the first interval difference scatter plot according to the first timestamp, the first interval sequence and the first interval difference sequence;
[0104] Here, the current step is to perform discrete point cumulative tracing processing on a set of three types of scatter plots (first interval scatter plot, first time interval scatter plot and first interval difference scatter plot) of the hour period corresponding to the first timestamp according to the first interval sequence and the first interval difference sequence;
[0105] Specifically, it includes: step 611, extracting the hour information of the first timestamp as the current hour period information;
[0106] Step 612, and taking a set of first interval scatter plots, first time interval scatter plots and first interval difference scatter plots corresponding to the current hour period information as the current interval scatter plots, the current time interval scatter plots and the current interval difference scatter plots;
[0107] For example, suppose that 4 groups of three-type scatter plots (first interval scatter plot, first time interval scatter plot and first interval difference scatter plot) have been generated, and the corresponding hour time period information is 5, 6, 7 and 8 respectively; when the hour information of the first timestamp is 8, the group of three-type scatter plots with hour time period information = 8 is selected for discrete point update; when the hour information of the first timestamp is 5, the group of three-type scatter plots with hour time period information = 5 is selected for discrete point update;
[0108] Step 613, for the first interval d of the first interval sequence j Perform polling; and set the first period d of the current polling j As the corresponding horizontal coordinate x1, the next first interval d j+1 As the corresponding ordinate y1; and the abscissa x1 and the ordinate y1 form the corresponding current discrete point coordinates (x1, y1); and the points corresponding to the current discrete point coordinates (x1, y1) on the current interval scatter plot are discretely plotted; and the first interval d of the current polling j Is it the second to last first period? Confirm it. If not, continue to the next first period d j+1 Conduct polling, if yes, end polling;
[0109] For example, the first interval sequence includes 29 first intervals d j , from the 1st to the 28th first interval d j By polling, we can get the coordinates of 28 discrete points: (x1 = d j=1 ,y1=d j=2 ),(x1=d j=2 ,y1=d j=3 ), and so on, (x1=d j=28 ,y1=d j=29 ); correspondingly, 28 discrete points can be added cumulatively on the current interval scatter plot;
[0110] Step 614, the first interval d of the first interval sequence j Perform polling; and set the first period d of the current polling j The current interval d j ; and set the current interval d j The corresponding first R point time t i=j+1 As the corresponding horizontal coordinate x2, the current interval d j As the corresponding ordinate y2; and the abscissa x2 and the ordinate y2 form the corresponding current discrete point coordinates (x2, y2); and the points corresponding to the current discrete point coordinates (x2, y2) on the current time interval scatter plot are discretely plotted; and the current interval d j Is it the last first period to confirm? If not, continue to the next first period d j+1 Conduct polling, if yes, end polling;
[0111] For example, the first interval sequence includes 29 first intervals d j , from the 1st to the 29th first interval d j By polling, we can get the coordinates of 29 discrete points: (x1 = t i=2 ,y1=d j=1 ),(x1=t i=3 ,y1=d j=2 ), and so on, (x1=t i=30 ,y1=d j=29 ); correspondingly, 29 discrete points can be added to the scatter plot of the current time interval;
[0112] Step 615: the first interval difference value s of the first interval difference value sequence k Perform polling; and set the first period difference s of the current polling k As the corresponding horizontal coordinate x3, the next first interval difference s k+1 As the corresponding ordinate y3; and the abscissa x3 and the ordinate y3 form the corresponding current discrete point coordinates (x3, y3); and the points corresponding to the current discrete point coordinates (x3, y3) on the current interval difference scatter plot are discretely plotted; and the first interval difference s of the current polling k Is it the second to last first period difference? Confirm it. If not, continue to the next first period difference s k+1 Conduct polling, if yes, end polling;
[0113] For example, the first interval difference sequence includes 28 first interval difference values s k , the difference between the first and the 27th intervals s k By polling, we can get the coordinates of 27 discrete points: (x3=s k=1,y3=s k=2 ),(x3=s k=2 ,y3=s k=3 ), and so on, (x3=s k=27 ,y3=s k=28 ); correspondingly, 27 discrete points can be added cumulatively on the current interval difference scatter plot;
[0114] Step 62, updating the second interval scatter plot, the second time interval scatter plot and the second interval difference scatter plot according to the first interval sequence and the first interval difference sequence;
[0115] Here, the current step is to perform discrete point cumulative tracing processing on a unique set of three types of scatter plots (second interval scatter plot, second time interval scatter plot and second interval difference scatter plot) in the entire period (24 hours) according to the first interval sequence and the first interval difference sequence;
[0116] Specifically, step 621 includes: j Perform polling; and set the first period d of the current polling j As the corresponding horizontal coordinate x4, the next first interval d j+1 As the corresponding ordinate y4; and the abscissa x4 and the ordinate y4 form the corresponding current discrete point coordinates (x4, y4); and the points corresponding to the current discrete point coordinates (x4, y4) on the second interval scatter plot are discretely plotted; and the first interval d of the current polling j Is it the second to last first period? Confirm it. If not, continue to the next first period d j+1 Conduct polling, if yes, end polling;
[0117] Here, the current step is similar to the aforementioned step 613, and will not be further described here;
[0118] Step 622, for the first interval d of the first interval sequence j Perform polling; and set the first period d of the current polling j The current interval d j ; and set the current interval d j The corresponding first R point time t i=j+1 As the corresponding horizontal coordinate x5, the current interval d j As the corresponding ordinate y5; and the abscissa x5 and the ordinate y5 form the corresponding current discrete point coordinates (x5, y5); and the points corresponding to the current discrete point coordinates (x5, y5) on the second time interval scatter plot are discretely plotted; and the current interval d j Is it the last first period to confirm? If not, continue to the next first period d j+1Conduct polling, if yes, end polling;
[0119] Here, the current step is similar to the aforementioned step 614, and will not be further described here;
[0120] Step 623, the first interval difference value s of the first interval difference value sequence is k Perform polling; and set the first period difference s of the current polling k As the corresponding horizontal coordinate x6, the next first interval difference s k+1 As the corresponding ordinate y6; and the abscissa x6 and the ordinate y6 form the corresponding current discrete point coordinates (x6, y6); and the points corresponding to the current discrete point coordinates (x6, y6) on the second interval difference scatter plot are discretely plotted; and the first interval difference s of the current polling k Is it the second to last first period difference? Confirm it. If not, continue to the next first period difference s k+1 Perform polling, and if yes, end polling.
[0121] Here, the current step is similar to the aforementioned step 615 and will not be further described here.
[0122] Figure 2 This is a module structure diagram of an electrocardiogram processing device provided in the second embodiment of the present invention. The device can be a terminal device or a server that implements the method of the embodiment of the present invention, or a device that implements the method of the embodiment of the present invention connected to the above terminal device or server. For example, the device can be a device or chip system of the above terminal device or server. Figure 2 As shown, the ECG scattergram processing device 20 is connected to the acquisition end 30; the ECG scattergram processing device 20 includes: a data receiving module 201, a first data preprocessing module 202, a second data preprocessing module 203 and a scattergram processing module 204.
[0123] The data receiving module 201 is used to receive the first connection request sent by the collection terminal 30; and verify the collection terminal 30 according to the first connection request, and when the verification is successful, construct the corresponding first interval scatter plot, first time interval scatter plot, first interval difference scatter plot, second interval scatter plot, second time interval scatter plot and second interval difference scatter plot for the collection terminal 30, and allocate the corresponding first data channel and first channel file to the collection terminal 30, and listen to the collection terminal 30 on the first data channel.
[0124] The first data preprocessing module 202 is used to, when completing a data reception on the acquisition end 30 on the first data channel, use the data received this time as the corresponding first ECG data packet; and extract the first ECG signal and the first timestamp from the first ECG data packet; and perform R-point detection on the first ECG signal to generate a corresponding first R-point sequence, and perform RR interval statistics on the first R-point sequence to generate a corresponding first interval sequence, and perform RR interval difference statistics on the first interval sequence to generate a corresponding first interval difference sequence.
[0125] The second data preprocessing module 203 is used to form a corresponding first acquisition record from a first timestamp, a first interval sequence and a first interval difference sequence; and store the first acquisition record in a specified position in the first channel file in chronological order; if the adding position of the first acquisition record in the first channel file is the end of the file, then confirm whether the hour information of the first timestamps of the last two acquisition records in the first channel file matches, if not, construct a new set of first interval scatter plots, first time interval scatter plots and first interval difference scatter plots, and assign a corresponding hour time period information to this set of new scatter plots based on the hour information of the first timestamp.
[0126] The scatter plot processing module 204 is used to update the first interval scatter plot, the first time interval scatter plot and the first interval difference scatter plot according to the first timestamp, the first interval sequence and the first interval difference sequence; and to update the second interval scatter plot, the second time interval scatter plot and the second interval difference scatter plot according to the first interval sequence and the first interval difference sequence.
[0127] The acquisition terminal 30 is used to send a first connection request carrying a locally stored first acquisition terminal identifier to the ECG scattergram processing device 20 before starting the remote transmission of the ECG signal; and receive a first request receipt sent back by the ECG scattergram processing device 20; and confirm whether there is connection success information in the first request receipt; if it is confirmed to be present, real-time ECG signal acquisition and processing is performed according to a preset signal acquisition frequency; during the acquisition process, a corresponding first ECG signal is generated each time a signal acquisition of a specified time period is completed; and the start acquisition time of the first ECG signal is used as the corresponding first timestamp; and the first ECG signal and the first timestamp form a corresponding first ECG data packet; and send the first ECG data packet to the ECG scattergram processing device 20; when sending the first ECG data packet, if a network failure occurs and causes data transmission failure, the first ECG data packet that failed to be sent at that time is stored in a local unsent data queue; and after the network failure is resolved and the connection is reestablished with the ECG scattergram processing device 20, one or more first ECG data packets in the unsent data queue are resent one by one according to the first-in-first-out principle.
[0128] An electrocardiogram processing device provided in an embodiment of the present invention can execute the method steps in the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0129] It should be noted that it should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software called by processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. For example, the data receiving module can be a separately established processing element, or it can be integrated in a chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and called and executed by a processing element of the above device. The function of the above-mentioned module is determined. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.
[0130] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more digital signal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module above is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0131] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in accordance with the embodiment of the present invention is generated in whole or in part. The above computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The above computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the above computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (Digital Subscriber Line, DSL)) or wireless (e.g., infrared, wireless, Bluetooth, microwave, etc.) mode to another website site, computer, server or data center. The above computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, data center, etc. that includes one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).
[0132] Figure 3 This is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present invention. The electronic device may be the aforementioned terminal device or server, or may be a terminal device or server connected to the aforementioned terminal device or server to implement the method of the embodiment of the present invention. Figure 3 As shown, the electronic device may include: a processor 301 (such as a CPU), a memory 302, and a transceiver 303; the transceiver 303 is coupled to the processor 301, and the processor 301 controls the transceiver 303. Various instructions may be stored in the memory 302 to complete various processing functions and implement the methods and processing procedures provided in the above embodiments of the present invention. Preferably, the electronic device involved in the embodiment of the present invention also includes: a power supply 304, a system bus 305 and a communication port 306. The system bus 305 is used to realize communication connection between components. The above-mentioned communication port 306 is used for connection and communication between the electronic device and other peripherals.
[0133] exist Figure 3The system bus mentioned in the figure can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface is used to realize the communication between the database access device and other devices (such as clients, read-write libraries, and read-only libraries). The memory may include random access memory (RAM) and may also include non-volatile memory (Non-Volatile Memory), such as at least one disk storage.
[0134] The above-mentioned processor can be a general-purpose processor, including a central processing unit CPU, a network processor (NP), etc.; it can also be a digital signal processor DSP, an application-specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0135] It should be noted that an embodiment of the present invention further provides a computer-readable storage medium, in which instructions are stored. When the storage medium is run on a computer, the computer executes the method and processing process provided in the above embodiments.
[0136] An embodiment of the present invention further provides a chip for executing instructions, and the chip is used to execute the method and processing process provided in the above embodiment.
[0137] The embodiment of the present invention provides an electrocardiogram scatter plot processing method, device, electronic device and computer-readable storage medium, which performs R point detection on the received electrocardiogram signal to obtain the corresponding R point sequence, performs RR interval statistics on the R point sequence to obtain the corresponding RR interval sequence, and performs interval difference statistics on the RR interval sequence to obtain the corresponding interval difference sequence; and automatically generates three types of real-time updated scatter plots (interval scatter plot, time interval scatter plot, interval difference scatter plot) based on the interval sequence and the interval difference sequence; and provides two statistical forms of single time period and full time period for each type of scatter plot. Through the present invention, users can be provided with multi-type and multi-temporal real-time electrocardiogram scatter plots, thereby making up for the defect that the conventional service end cannot actively draw a variety of electrocardiogram scatter plots, reducing the difficulty of operation for the on-duty personnel, and improving the efficiency of remote electrocardiogram analysis and monitoring.
[0138] The professionals should further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0139] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0140] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for processing an electrocardiogram scattergram, characterized in that: The method comprises: The server receives a first connection request sent by the acquisition end; Verifying the acquisition end according to the first connection request, and constructing a corresponding first interval scatter plot, a first time interval scatter plot, a first interval difference scatter plot, a second interval scatter plot, a second time interval scatter plot, and a second interval difference scatter plot for the acquisition end when the verification succeeds, and allocating a corresponding first data channel and a first channel file to the acquisition end, and intercepting the acquisition end on the first data channel; When the data receiving end is completed once in the first data channel, the data received this time is used as the corresponding first ECG data packet; and a first ECG signal and a first timestamp are extracted from the first ECG data packet; Performing R point detection on the first electrocardiogram signal to generate a corresponding first R point sequence, performing RR interval statistics on the first R point sequence to generate a corresponding first interval sequence, and performing RR interval difference statistics on the first interval sequence to generate a corresponding first interval difference sequence; A corresponding first acquisition record is composed of the first timestamp, the first interval sequence and the first interval difference sequence; and the first acquisition record is stored in a specified position in the first channel file in chronological order; if the adding position of the first acquisition record in the first channel file is the end of the file, whether the hour information of the first timestamp of the last two acquisition records in the first channel file matches is confirmed, and if they do not match, a new set of the first interval scatter plot, the first time interval scatter plot and the first interval difference scatter plot is constructed, and a corresponding hour time period information is assigned to the set of new scatter plots based on the hour information of the first timestamp; The first interval scatter plot, the first time interval scatter plot and the first interval difference scatter plot are updated according to the first timestamp, the first interval sequence and the first interval difference sequence; and the second interval scatter plot, the second time interval scatter plot and the second interval difference scatter plot are updated according to the first interval sequence and the first interval difference sequence.
2. The electrocardiogram processing method according to claim 1, characterized in that: The verifying the acquisition end according to the first connection request, and constructing a corresponding first interval scatter plot, a first time interval scatter plot, a first interval difference scatter plot, a second interval scatter plot, a second time interval scatter plot, and a second interval difference scatter plot for the acquisition end when the verification succeeds, and allocating a corresponding first data channel and a first channel file to the acquisition end, and monitoring the acquisition end on the first data channel, specifically includes: Extract the first acquisition terminal identifier from the first connection request; query the local registered acquisition terminal list according to the first acquisition terminal identifier, and record the registered acquisition terminal record whose acquisition terminal identifier field in the registered acquisition terminal list matches the first acquisition terminal identifier as the corresponding matching record; if the matching record is not empty, set the first verification result to successful verification, otherwise set the first verification result to failed verification; the registered acquisition terminal list includes a plurality of registered acquisition terminal records; the registered acquisition terminal record includes the acquisition terminal identifier field, the acquisition terminal name field, the acquisition terminal MAC code field, the acquisition terminal manufacturer field, the acquisition terminal model field and the acquisition terminal registration time field; When the first verification result is successful verification, two single-quadrant two-dimensional lorenz scatter plots with RR interval as horizontal and vertical axes are constructed as the corresponding first and second interval scatter plots; and two single-quadrant two-dimensional scatter plots with time as the horizontal axis and RR interval as the vertical axis are constructed as the corresponding first and second time interval scatter plots, and the horizontal axis time length of the first time interval scatter plot is set to one hour, and the horizontal axis time length of the second time interval scatter plot is set to twenty-four hours; and two four-quadrant two-dimensional scatter plots with RR interval difference as horizontal and vertical axes are constructed as the corresponding first and second interval difference scatter plots; and based on the hourly period of the current time, a corresponding hourly period information is assigned to the first interval scatter plot, the first time interval scatter plot and the first interval difference scatter plot; and allocating a data receiving channel to the acquisition end as the corresponding first data channel; and allocating a collection record storage file to the acquisition end as the corresponding first channel file, and initializing the first channel file to be empty; And send the first request receipt carrying the connection success information back to the acquisition end; and continuously monitor the sending data of the acquisition end on the first data channel.
3. The electrocardiogram processing method according to claim 1, characterized in that: The performing R point detection on the first electrocardiogram signal to generate a corresponding first R point sequence, performing RR interval statistics on the first R point sequence to generate a corresponding first interval sequence, and performing RR interval difference statistics on the first interval sequence to generate a corresponding first interval difference sequence, specifically includes: Setting the starting time of the first electrocardiogram signal as the first timestamp; Perform QRS wave group detection on the first electrocardiogram signal to obtain multiple first QRS wave groups; perform R point identification on each of the first QRS wave groups to generate a corresponding first R point; extract the time interval of each of the first R points relative to the starting point of the first electrocardiogram signal to generate a corresponding first R point offset duration; and set the absolute time of each of the first R points according to the sum of the first timestamp and the first R point offset duration and record it as the corresponding first R point time t i , i is a positive integer; and for all the first R point times t i Generate the corresponding first R point sequence in chronological order; For any two adjacent first R points in the first R point sequence, the time t i ,t i+1 Perform absolute difference calculation to generate the corresponding first interval d j , d j =|t i=j+1 -t i=j |, j is a positive integer, || is an absolute value operator; and all the first intervals d j Generate the corresponding first interval sequence in chronological order; the first interval d j The time point is the same as the first R point time t i=j+1 correspond; For any two adjacent first intervals d in the first interval sequence j d j+1 Perform difference calculation to generate the corresponding first interval difference s k ,s k =(d j=k+1 -d j=k ), k is a positive integer; and all the first interval differences s are obtained k Generate the corresponding first interval difference sequence in chronological order; the first interval difference s k The time point is the same as the first R point time t i=k+2 correspond.
4. The electrocardiogram processing method according to claim 1, characterized in that: The step of storing the first acquisition record in a specified position in the first channel file in chronological order specifically includes: Recording the first acquisition record currently to be saved as a new acquisition record, and recording the first timestamp of the new acquisition record as a new record timestamp; recording each acquisition record currently stored in the first channel file as an old acquisition record, and extracting the first timestamp of the last old acquisition record to generate a corresponding end timestamp; If the timestamp of the new record is later than the end timestamp, then adding the new acquisition record to the end of the first channel file and saving it; If the timestamp of the new record is earlier than the end timestamp, the old acquisition record corresponding to the first timestamp that is later than the timestamp of the new record in the first channel file is recorded as the first record; and the previous old acquisition record of the first record is recorded as the second record; and the new acquisition record is inserted between the second record and the first record and saved.
5. The electrocardiogram processing method according to claim 3, characterized in that: The updating of the first interval scatter plot, the first time interval scatter plot and the first interval difference scatter plot according to the first timestamp, the first interval sequence and the first interval difference sequence specifically includes: Extracting the hour information of the first timestamp as current hour period information; and taking a set of the first interval scatter plot, the first time interval scatter plot and the first interval difference scatter plot corresponding to the current hour period information as the current interval scatter plot, the current time interval scatter plot and the current interval difference scatter plot; The first interval d of the first interval sequence j Perform polling; and set the first interval d of the current polling j As the corresponding horizontal coordinate x1, the next first interval d j+1 as the corresponding ordinate y1; and the abscissa x1 and the ordinate y1 form the corresponding current discrete point coordinates (x1, y1); and perform discrete point tracing on the points corresponding to the current discrete point coordinates (x1, y1) on the current interval scatter plot; and the first interval d of the current polling j Is it the second to last first period? Confirm. If not, continue to the next first period d j+1 Conduct polling, if yes, end polling; The first interval d of the first interval sequence j Perform polling; and set the first interval d of the current polling j The current interval d j ; and the current interval d j The corresponding first R point time t i=j+1 As the corresponding horizontal coordinate x2, the current interval d j as the corresponding ordinate y2; and the abscissa x2 and the ordinate y2 form the corresponding current discrete point coordinates (x2, y2); and perform discrete point tracing on the points corresponding to the current discrete point coordinates (x2, y2) on the current time interval scatter plot; and calculate the current interval d j Is it the last first period? Confirm, if not, continue to the next first period d j+1 Conduct polling, if yes, end polling; The first interval difference value s of the first interval difference value sequence k Polling; and the first interval difference s of the current polling k As the corresponding horizontal coordinate x3, the next first interval difference s k+1 as the corresponding ordinate y3; and the abscissa x3 and the ordinate y3 form the corresponding current discrete point coordinates (x3, y3); and perform discrete point plotting on the points corresponding to the current discrete point coordinates (x3, y3) on the current interval difference scatter plot; and the first interval difference s of the current polling k Is it the second to last first interval difference? Confirm it. If not, continue to check the next first interval difference s k+1 Perform polling, and if yes, end polling.
6. The electrocardiogram processing method according to claim 3, characterized in that: The updating of the second interval scatter plot, the second time interval scatter plot and the second interval difference scatter plot according to the first interval sequence and the first interval difference sequence specifically includes: The first interval d of the first interval sequence j Perform polling; and set the first interval d of the current polling j As the corresponding horizontal coordinate x4, the next first interval d j+1 as the corresponding ordinate y4; and the abscissa x4 and the ordinate y4 form the corresponding current discrete point coordinates (x4, y4); and perform discrete point tracing on the points corresponding to the current discrete point coordinates (x4, y4) on the second interval scatter plot; and perform discrete point tracing on the first interval d of the current polling j Is it the second to last first period? Confirm. If not, continue to the next first period d j+1 Conduct polling, if yes, end polling; The first interval d of the first interval sequence j Perform polling; and set the first interval d of the current polling j The current interval d j ; and the current interval d j The corresponding first R point time t i=j+1 As the corresponding horizontal coordinate x5, the current interval d j as the corresponding ordinate y5; and the abscissa x5 and the ordinate y5 form the corresponding current discrete point coordinate (x5, y5); and perform discrete point plotting on the point corresponding to the current discrete point coordinate (x5, y5) on the second time interval scatter plot; and j Is it the last first period? Confirm, if not, continue to the next first period d j+1 Conduct polling, if yes, end polling; The first interval difference value s of the first interval difference value sequence k Polling; and the first interval difference s of the current polling k As the corresponding horizontal coordinate x6, the next first interval difference s k+1 as the corresponding ordinate y6; and the abscissa x6 and the ordinate y6 form the corresponding current discrete point coordinates (x6, y6); and perform discrete point plotting on the points corresponding to the current discrete point coordinates (x6, y6) on the second interval difference scatter plot; and the first interval difference s of the current polling k Is it the second to last first interval difference? Confirm it. If not, continue to check the next first interval difference s k+1 Perform polling, and if yes, end polling.
7. The electrocardiogram processing method according to claim 2, characterized in that: The method further comprises: Before starting the remote transmission of the ECG signal, the acquisition end sends the first connection request carrying the first acquisition end identifier stored locally to the server end; and receives the first request receipt sent back by the server end; and confirms whether there is connection success information in the first request receipt; if it is confirmed that there is, real-time ECG signal acquisition and processing is performed according to a preset signal acquisition frequency; During the acquisition process, each time a signal acquisition of a specified time period is completed, a corresponding first ECG signal is generated; and the start acquisition time of the first ECG signal is used as the corresponding first timestamp; and the first ECG signal and the first timestamp form a corresponding first ECG data packet; and the first ECG data packet is sent to the server; When sending the first ECG data packet, if a network failure occurs resulting in data transmission failure, the first ECG data packet that failed to be sent will be stored in a local unsent data queue; and after the network failure is resolved and the connection is reestablished with the server, one or more of the first ECG data packets in the unsent data queue will be resent one by one according to the first-in-first-out principle.
8. A device for implementing the electrocardiogram processing method according to any one of claims 1 to 7, characterized in that: The device is connected to the collection end; the device comprises: a data receiving module, a first data preprocessing module, a second data preprocessing module and a scatter plot processing module; The data receiving module is used to receive a first connection request sent by the acquisition end; and verify the acquisition end according to the first connection request, and when the verification is successful, construct a corresponding first interval scatter plot, a first time interval scatter plot, a first interval difference scatter plot, a second interval scatter plot, a second time interval scatter plot, and a second interval difference scatter plot for the acquisition end, and allocate a corresponding first data channel and a first channel file to the acquisition end, and monitor the acquisition end on the first data channel; The first data preprocessing module is used to, when completing a data reception of the acquisition end on the first data channel, use the data received this time as the corresponding first ECG data packet; and extract the first ECG signal and the first timestamp from the first ECG data packet; and perform R point detection on the first ECG signal to generate a corresponding first R point sequence, and perform RR interval statistics on the first R point sequence to generate a corresponding first interval sequence, and perform RR interval difference statistics on the first interval sequence to generate a corresponding first interval difference sequence; The second data preprocessing module is used to form a corresponding first acquisition record from the first timestamp, the first interval sequence and the first interval difference sequence; and storing the first acquisition record in a designated position in the first channel file in chronological order; if the adding position of the first acquisition record in the first channel file is the end of the file, confirming whether the hour information of the first timestamps of the last two acquisition records in the first channel file matches, and if they do not match, constructing a new set of the first interval scatter plot, the first time interval scatter plot and the first interval difference scatter plot, and assigning a corresponding hour time period information to the set of new scatter plots based on the hour information of the first timestamp; The scatter plot processing module is used to update the first interval scatter plot, the first time interval scatter plot and the first interval difference scatter plot according to the first timestamp, the first interval sequence and the first interval difference sequence; and update the second interval scatter plot, the second time interval scatter plot and the second interval difference scatter plot according to the first interval sequence and the first interval difference sequence; The acquisition end is used to send the first connection request carrying the first acquisition end identifier stored locally to the device before starting the remote transmission of the ECG signal; and receive the first request receipt sent back by the device; and confirm whether there is connection success information in the first request receipt; if it is confirmed to exist, real-time ECG signal acquisition and processing is performed according to a preset signal acquisition frequency; during the acquisition process, a corresponding first ECG signal is generated each time a signal acquisition of a specified duration is completed; and the start acquisition time of the first ECG signal is used as the corresponding first timestamp; and the first ECG signal and the first timestamp form a corresponding first ECG data packet; and the first ECG data packet is sent to the device; when sending the first ECG data packet, if a network failure occurs and causes data transmission failure, the first ECG data packet that failed to be sent at that time will be stored in the local unsent data queue; After the network failure is resolved and the connection with the device is reestablished, one or more of the first ECG data packets in the unsent data queue are resent one by one according to the first-in-first-out principle.
9. An electronic device, characterized in that: include: memory, processors, and transceivers; The processor is used to couple with the memory, read and execute instructions in the memory, so as to implement the method steps described in any one of claims 1 to 7; The transceiver is coupled to the processor, and the processor controls the transceiver to send and receive messages.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, which, when executed by a computer, enable the computer to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Artificial intelligence-based electrocardiogram interference recognition method
CN107832737A
Processing method and device of three-dimensional ECG scattergram
CN110403598A