Multi-channel physiological data sampling method and system
By introducing multiple control modules into the multi-channel physiological data sampling system, synchronous acquisition and processing of physiological data of multiple sampling modules is realized, and the synchronization problem of data acquisition and processing in the prior art is solved, and the completeness and accuracy of data are improved.
Patent Information
- Application Number
- CN202411958715.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-25
AI Technical Summary
The prior art is difficult to realize synchronous data acquisition and processing in multi-channel physiological data sampling, resulting in the inability to effectively guarantee the completeness and accuracy of the data.
By introducing a first control module, a second control module and a computer control module in the multi-channel physiological data sampling system, synchronous acquisition, packaging and processing of physiological data of multiple sampling modules is realized. The specific steps include: the first control module acquires and saves the physiological data of multiple sampling channels and packages it into data packets; the second control module interacts with the first control module and transmits the data packets to the upper computer control module; the upper computer control module sorts and processes the received data packets.
Through this method, the reliability, completeness and accuracy of physiological data sampling of multiple sampling channels are ensured, and the user experience is improved.
Smart Images

Figure CN119892947A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of signal processing technology, and more specifically to a multi-channel physiological data sampling method and a multi-channel physiological data sampling system. Background Art
[0002] With the development of science and technology, real-time monitoring and analysis of physiological data has become increasingly important. Physiological data such as electrocardiogram data, electroencephalogram data, electromyography data, and neural data are of great significance for diagnosing diseases, evaluating treatment effects, and studying human physiological functions.
[0003] However, there are some limiting factors in the relevant technologies that affect the quality and efficiency of data sampling. For example, the use of multi-channel sampling makes it difficult to synchronize the sampling of multiple physiological signals at different locations or types. During data transmission and processing, due to the large amount of data and high real-time requirements, the existing data sampling mechanism cannot effectively guarantee the integrity and accuracy of the data. Summary of the invention
[0004] The present invention has been made in view of the above-mentioned problems.
[0005] According to one aspect of the present invention, a multi-channel physiological data sampling method is provided, comprising:
[0006] The first control module simultaneously acquires and saves the physiological data sampled by the multiple sampling channels of each sampling module in the multiple sampling modules, and when the accumulation of the physiological data sampled by each sampling module meets the preset conditions, the physiological data of the sampling module at this time is packaged into a first data packet; the second control module and the first control module start to interact when the physiological data sampled by at least one sampling module meets the preset conditions, so as to acquire at least one corresponding first data packet, and send the at least one corresponding first data packet to the host computer control module in sequence; the host computer control module acquires the first data packets in sequence, and sorts the multiple first data packets that are continuously acquired and correspond to the multiple sampling modules one by one according to the preset order of the multiple sampling modules, so as to obtain the physiological data sampled by all sampling channels on all sampling modules that change with time.
[0007] Exemplarily, the multi-channel physiological data sampling method also includes: whenever the host computer control module accumulates a preset number of first data packets, it inputs the preset number of first data packets as second data packets into a thread pool including multiple threads, and uses one of the multiple threads to process the second data packet.
[0008] Exemplarily, before a preset number of first data packets are input as second data packets into a thread pool including multiple threads, the multi-channel physiological data sampling method also includes: the host computer control module sequentially sets identifiers that conform to a preset rule for the second data packets according to the order in which the second data packets are acquired; after the second data packets are processed using one of the multiple threads, the multi-channel physiological data sampling method also includes: the host computer control module sorts all processed second data packets according to a preset rule based on the identifiers of the processed second data packets; and displays the sorted processed second data packets on the host computer front end.
[0009] Exemplarily, displaying the sorted and processed second data packet on the upper computer front end specifically includes: judging whether the identifier of the next processed second data packet complies with a preset rule based on the identifier of the currently displayed second data packet and the sorted and processed second data packet; if it complies with the preset rule, updating the next processed second data packet to the currently displayed second data packet, so that the upper computer front end can display it according to the currently displayed second data packet.
[0010] Exemplarily, whenever a preset number of first data packets are accumulated, the preset number of first data packets are input as second data packets into a thread pool including multiple threads, and the second data packets are processed using one of the multiple threads, including: for each thread, the physiological data corresponding to the second data packet processed by the thread is processed in sequence according to the preset order of the sampling channels of the physiological data until the physiological data sampled by all sampling channels are processed.
[0011] Exemplarily, using one thread among the multiple threads to process the second data packet includes: using one thread among the multiple threads to perform downsampling processing on the second data packet.
[0012] Exemplarily, before inputting a preset number of first data packets as second data packets into a thread pool including multiple threads, the multi-channel physiological data sampling method also includes: the host computer control module performs filtering processing, common average reference processing and phase detection processing on the physiological data corresponding to the second data packet.
[0013] Exemplarily, before inputting a preset number of first data packets as second data packets into a thread pool including multiple threads, the multi-channel physiological data sampling method further includes: the host computer control module time-aligns the physiological data of all sampling channels of all sampling modules in each second data packet.
[0014] Exemplarily, the second control module sends the corresponding at least one first data packet to the host computer control module in sequence, specifically including: the second control module also stores a timestamp in each first data packet; and sends the first data packet with the timestamp to the host computer control module; the physiological data of all sampling channels of all sampling modules in each second data packet are time-aligned, specifically including: the host computer control module determines the first data packet first obtained from a preset number of first data packets corresponding to each second data packet; according to the timestamp of the physiological data of the first obtained first data packet and the sampling rates of different sampling modules, the physiological data of all sampling channels of all sampling modules are time-aligned.
[0015] Exemplarily, a second data packet is processed using one of multiple threads, including: performing a first downsampling process on the second data packet; displaying the sorted and processed second data packet on the front end of a host computer, including: displaying a first waveform sampled by each sampling channel according to the physiological data sampled by each sampling channel of each sampling module in the second data packet after the first downsampling process; determining the corresponding unprocessed physiological data sampled by the target sampling channel in response to a user's selection operation on the first waveform of the target sampling channel; performing a second downsampling process on the unprocessed second data packet corresponding to the target sampling channel to obtain downsampled physiological data, wherein the second downsampling process is different from the downsampling method of the first downsampling process; and displaying the second waveform of the target sampling channel according to the downsampled physiological data.
[0016] Exemplarily, each sampling module includes an analog-to-digital conversion module, and the first control module simultaneously acquires and saves the physiological data sampled by multiple sampling channels of each sampling module in the multiple sampling modules, specifically including: the first control module acquires the trigger signal sent by the analog-to-digital conversion module according to a preset sampling rate; according to the trigger signal, acquires and stores the sampling data after the analog-to-digital conversion of the sampled physiological signal by the analog-to-digital conversion module; reads the stored sampling data according to the target sampling rate to obtain the target sampling data as the sampled physiological data; wherein the difference between the preset sampling rate and the target sampling rate is less than the first threshold value.
[0017] According to another aspect of the present invention, a multi-channel physiological data sampling system is also provided, comprising: a plurality of sampling modules, a first control module, a second control module and a host computer control module, wherein each of the plurality of sampling modules comprises a plurality of sampling channels for sampling physiological data; the first control module is used to simultaneously acquire and save the physiological data sampled by the plurality of sampling channels of each of the plurality of sampling modules, and when the accumulation of the physiological data sampled by each sampling module meets the preset conditions, the physiological data of the sampling module at this time is packaged into a first data packet; the second control module is used to start interacting with the first control module when the physiological data sampled by at least one sampling module meets the preset conditions, so as to acquire at least one corresponding first data packet, and send the corresponding at least one first data packet to the host computer control module in sequence; the host computer control module is used to acquire the first data packets in sequence, and for each plurality of first data packets that are continuously acquired and correspond to the plurality of sampling modules, the plurality of first data packets that are continuously acquired are sorted in a preset order of the plurality of sampling modules, so as to obtain the physiological data sampled by all sampling channels on all sampling modules that change over time.
[0018] The above technical solution simultaneously acquires and saves the physiological data of multiple sampling channels through the first control module, and whenever the preset conditions are met, it is packaged into a first data packet and transmitted to the host computer through the second control module, and the host computer integrates and processes the physiological data. This ensures the reliability, integrity and accuracy of the physiological data sampling of multiple sampling channels and improves the user experience.
[0019] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The above and other purposes, features and advantages of the present invention will become more apparent by describing the embodiments of the present invention in more detail in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention.
[0021] Figure 1 A schematic flow chart of a multi-channel physiological data sampling method according to an embodiment of the present invention is shown;
[0022] Figure 2 A schematic block diagram of a multi-channel physiological data sampling system according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solution and advantages of the present invention more obvious, exemplary embodiments according to the present invention will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention.
[0024] In order to at least solve the above technical problems, an embodiment of the present invention provides a multi-channel physiological data sampling method. Figure 1 FIG. 4 is a schematic flow chart of a multi-channel physiological data sampling method according to an embodiment of the present invention. Figure 1 As shown, the method includes: step S1100, step S1200 and step S1300.
[0025] In step S1100, the first control module simultaneously acquires and saves the physiological data sampled by the multiple sampling channels of each sampling module in the multiple sampling modules, and when the accumulated physiological data sampled by each sampling module meets the preset conditions, the physiological data of the sampling module at this time is packaged into a first data packet.
[0026] Physiological data may include electrocardiogram data, electroencephalogram data, electromyography data, neural data, etc. A collection device may be set at a suitable position of the organism to obtain the physiological data of the organism. The collection device may include electrodes, sensors, etc. The first control module may be connected to multiple sampling modules. Each sampling module may have multiple sampling channels, and each sampling channel may be connected to a collection device. Thus, the first control module may simultaneously obtain and save physiological data sampled by multiple sampling channels. For example, the first control module may control 4 sampling modules, each of which has 16 sampling channels. Thus, the first control module may simultaneously obtain and save physiological data sampled by 64 sampling channels. In some embodiments, the sampling module may include an analog-to-digital conversion module, which may convert physiological data in the form of analog signals collected by the collection device connected to each sampling channel into the form of digital signals, and send the converted physiological data to the first control module. The first control module may be implemented using an FPGA (field programmable logic device). The first control module may package the physiological data corresponding to each sampling module at this time into a first data packet when the physiological data of each sampling module obtained and saved meets the preset conditions. It can be understood that the sampling module usually obtains and sends physiological data to the first control module at a certain sampling rate. The amount of physiological data sampled correspondingly can be calculated according to the sampling rate and sampling time of each sampling module. Similarly, the corresponding sampling time can be determined according to the sampling rate and the amount of physiological data of each sampling module. The preset condition can be the sampling time of the physiological data of each sampling module, and can also be the amount of physiological data sampled by each sampling module. The first control module can pack the physiological data sampled by all sampling channels of the sampling module stored therein into a first data packet when the physiological data sampled by a certain sampling module meets the preset condition. For example, the preset condition can include a sampling time of 4 milliseconds, and whenever a sampling module samples for 4 milliseconds, the first control module packs the physiological data collected by the sampling module for 4 milliseconds stored therein into a first data packet. The sampling rate of all sampling modules can be 10,000 Hz, and the amount of physiological data collected by each sampling channel for 4 milliseconds is 40, that is, whenever the amount of physiological data collected by each sampling channel of a sampling module is 40, the first control module packs the 40 physiological data collected by all sampling channels of the sampling module into a first data packet. It can be understood that if the sampling rates of the sampling modules are different, the amount of physiological data collected at the same sampling time may be different. The physiological data in the first data packet may be packaged according to sampling channels.
[0027] In step S1200, the second control module and the first control module start interacting when the physiological data sampled by at least one sampling module meets the preset conditions to obtain at least one corresponding first data packet, and send the at least one corresponding first data packet to the host computer control module in sequence.
[0028] The second control module may transmit the first data packet to the upper computer control module in a time-sharing manner. When the physiological data sampled by at least one sampling module in the first control module meets the preset conditions, the second control module interacts with the first control module to obtain the first data packet corresponding to at least one sampling module. And the obtained first data packet is sent to the upper computer control module in sequence. In some embodiments, the sampling rates of some sampling modules in the plurality of sampling modules may be the same. The physiological data corresponding to the sampling modules with the same sampling rate may meet the preset conditions at the same time. Thus, the second control module may simultaneously obtain multiple first data packets. For the multiple first data packets obtained at the same time, the second control module may send the multiple first data packets obtained at the same time to the upper computer control module in sequence in any order. For the multiple first data packets with the order of acquisition, they may be sent to the upper computer control module in sequence according to the order of acquisition. The second control module may include an ARM processor, which may transmit the first data packet in sequence to the upper computer control module through the TCP protocol.
[0029] In step S1300, the upper computer control module acquires the first data packets in sequence, and sorts each of the first data packets that are successively acquired and correspond to the multiple sampling modules according to the preset sequence of the multiple sampling modules to obtain the physiological data sampled by all the sampling channels on all the sampling modules that change with time.
[0030] The host computer control module may include a personal computer, a server, a workstation, etc., and may be connected to the second control module to receive the first data packet sent by the second control module. For the first data packet sent sequentially by the second control module, the host computer control module sorts the multiple first data packets continuously obtained according to the preset order of the multiple sampling modules when multiple first data packets corresponding to multiple sampling modules are obtained continuously. The preset order of multiple sampling modules may include the label order of multiple sampling modules. Before collecting physiological data, the user may set a preset order for multiple sampling modules according to needs. For example, there may be 4 sampling modules, and the labels 1, 2, 3 and 4 may be set for the 4 sampling modules respectively. The sampling rate of each sampling module may be different, and the time when the corresponding physiological data meets the preset conditions may be different. For sampling modules with the same sampling rate, the time when the corresponding physiological data meets the preset conditions may be the same, but the second control sends the first data packet to the host computer in sequence, and the order in which the host computer control module obtains the first data packet may also be different. Therefore, when the host computer control module obtains the first data packet corresponding to multiple sampling modules one by one, the first data packet corresponding to each sampling module obtained does not meet the preset order. For example, there may be 4 sampling modules, and the order in which the upper computer control module obtains the first data packets corresponding to the multiple sampling modules sent sequentially from the second control module may be 3, 4, 1, and 2. In other words, the first data packet corresponding to sampling module No. 3 is obtained first, then the first data packet corresponding to sampling module No. 4 is obtained, then the first data packet corresponding to sampling module No. 1 is obtained, and finally the first data packet corresponding to sampling module No. 2 is obtained. It does not conform to the preset order of the four sampling modules 1, 2, 3, and 4. The multiple first data packets obtained continuously can be sorted according to the preset order of the multiple sampling modules to obtain the physiological data sampled by all sampling channels on all sampling modules that change over time. It can be understood that each time the first data packet corresponding to each sampling module is obtained, the first data packets obtained continuously can be sorted to obtain the physiological data sampled by all sampling channels according to the preset order.
[0031] The above technical solution simultaneously acquires and saves the physiological data of multiple sampling channels through the first control module, and whenever the preset conditions are met, it is packaged into a first data packet and transmitted to the host computer through the second control module, and the host computer integrates and processes the physiological data. This ensures the reliability, integrity and accuracy of the physiological data sampling of multiple sampling channels and improves the user experience.
[0032] Exemplarily, the multi-channel physiological data sampling method also includes step S1400, when the host computer control module accumulates a preset number of first data packets, the preset number of first data packets are input as second data packets into a thread pool including multiple threads, and the second data packet is processed by one of the multiple threads. The preset number can be the number of first data packets. The preset number can be determined based on factors such as the processing speed of the host computer control module and the amount of physiological data in the first data packet. For example, the processing speed of the host computer control module affects the amount of physiological data in the second data packet, and the preset number and the amount of physiological data in the first data packet affect the amount of physiological data in the second data packet. For example, the faster the processing speed of the host computer control module, the larger the amount of physiological data in the second data packet can be, and further, the preset number of the first data packet can be larger. For another example, the preset number can be 40, that is, when 40 first data packets are obtained, these 40 first data packets are input as second data packets into the thread pool. The thread pool can include multiple threads. The thread pool can manage threads and assign processing tasks to each thread. Whenever the host computer control module accumulates a preset number of first data packets, the preset number of first data packets are input into the thread pool as the second data packet. The second data packet is processed by one of the multiple threads. Usually, the host computer control module can obtain a large number of second data packets in a short time. Thus, multiple second data packets can be processed in parallel to improve the processing speed. For example, when a second data packet is input into the thread pool, the thread pool can determine whether there is an idle thread. If there is an idle thread, the second data packet can be assigned to the idle thread for processing. If there is no idle thread, but the number of threads in the thread pool has not reached the maximum limit, a new thread can be created and the second data packet can be assigned to the thread. If there is no idle thread, but the number of threads in the thread pool has reached the maximum limit, the second data packet can be put into the work queue for processing. The processing of the second data packet may include Fourier analysis, spectrum estimation, time domain transformation, etc. of the physiological data in the second data packet. Optionally, the physiological data in the processed second data packet can be used for data analysis, waveform display, model training, etc.
[0033] The above technical solution processes the second data packet through a thread pool including multiple threads. Multiple threads can process multiple second data packets in parallel, thereby increasing the processing speed, reducing the processing time, and improving the user experience. In addition, a preset number of first data packets are accumulated as second data packets and input into the thread pool for processing, thereby avoiding frequent scheduling of threads by the thread pool and saving computing power.
[0034] Exemplarily, processing the second data packet using one of the multiple threads includes: performing downsampling processing on the second data packet using one of the multiple threads. The downsampling processing can downsample the physiological data of each sampling channel in the second data packet to reduce the amount of physiological data corresponding to each sampling channel in the second data packet. The downsampling processing can include performing downsampling processing on the second data packet using existing or future developed downsampling methods such as random downsampling and layered downsampling. Optionally, a downsampling condition can be set, such as the amount of data in each sampling channel in the second data packet is greater than a fixed value. If the amount of data in each sampling channel in the second data packet is greater than a fixed value, the thread performs downsampling processing on the second data packet. If the amount of data in each sampling channel in the second data packet is less than or equal to a fixed value, the thread does not perform downsampling processing on the second data packet.
[0035] The above technical solution performs downsampling processing on the second data packet through threads, reduces the amount of data, meets the requirements of subsequent analysis and processing, improves the speed of subsequent analysis and processing, and reduces computing costs.
[0036] Exemplarily, in step S1400, whenever a preset number of first data packets are accumulated, the preset number of first data packets are input as second data packets into a thread pool including multiple threads, and one of the multiple threads is used to process the second data packet, including: step S1410, for each thread, the physiological data corresponding to the second data packet processed by the thread is processed in sequence according to the preset order of the sampling channels of the physiological data, until the physiological data sampled by all sampling channels are processed. It can be understood that the second data packet is composed of a preset number of first data packets. Further, the second data packet includes physiological data collected by all sampling channels of all sampling modules. For example, there may be 4 sampling modules, each of which has 16 sampling channels, and the second data packet is composed of 40 first data packets, and the sampling time corresponding to one first data packet is 4 milliseconds. Thus, the second data packet includes 10 first data packets corresponding to the four sampling modules, and a total of 64 sampling channels collected physiological data in 40 milliseconds. In some embodiments, the sampling modules may have a preset order, and the sampling channels of each sampling module may have a preset order respectively. When the thread processes the second data packet, the physiological data corresponding to the sampling channels may be processed in sequence according to the preset order of the sampling channels corresponding to the sampling modules. For example, sampling module No. 1 has 16 sampling channels, which are numbered 1, 2, 3...16 in sequence. Sampling module No. 2 has 16 sampling channels, which are numbered 1, 2, 3...16 in sequence. The thread can first process the physiological data corresponding to the sampling channels corresponding to sampling module No. 1 in sequence according to the preset order. After the physiological data corresponding to all sampling channels of sampling module No. 1 are processed, the physiological data corresponding to the sampling channels of sampling module No. 2 are processed in the preset order until the physiological data sampled by all sampling channels are processed. In other embodiments, a preset order can be set for all sampling channels of all sampling modules. For example, two sampling modules are included, each sampling module includes 4 sampling channels, and the preset order corresponding to the 4 sampling channels of sampling module No. 1 can be 1, 3, 5, 7. The preset order corresponding to the 4 sampling channels of sampling module No. 2 can be 2, 4, 6, 8. The thread may first process the physiological data of the sampling channel with a preset order of 1 of sampling module No. 1 in the second data packet, and then process the physiological data of the sampling channel with a preset order of 2 of sampling module No. 2, until the physiological data sampled by all sampling channels are processed.
[0037] In the above technical solution, the threads process the corresponding physiological data in the second data packet in sequence according to the preset order of the sampling channels, thereby ensuring the order of processing the physiological data, avoiding confusion of the physiological data of multiple channels, and improving the accuracy of the physiological data.
[0038] Exemplarily, before a preset number of first data packets are input as second data packets into a thread pool including multiple threads, the multi-channel physiological data sampling method further includes: step S1500, the host computer control module sequentially sets an identifier that conforms to a preset rule for the second data packet according to the order in which the second data packets are obtained. As described above, whenever the host computer control module obtains a preset number of first data packets, a preset number of second data packets can be used as the second data packet. In other words, the second data packets are obtained in sequence. Therefore, the second data packet can be set with an identifier that conforms to a preset rule according to the order in which the second data packets are obtained. The preset rule can be that the identifier of the next second data packet obtained is the identifier of the last second data packet obtained plus one. The identifier of the first second data packet obtained can be 1. For example, the identifier of the last second data packet obtained can be 5, and the identifier of the second data packet currently obtained can be set to 6. The identifier set for the second data packet conforms to the preset rule, and the preset rule can represent the order in which the second data packet is obtained.
[0039] After one of the multiple threads is used to process the second data packet, the multi-channel physiological data sampling method further includes: step S1600 and step S1700. Step S1600 and step S1700 are performed after one of the multiple threads is used to process the second data packet.
[0040] In step S1600, the host computer control module sorts all the processed second data packets according to the identifier of the processed second data packet according to a preset rule. It can be understood that the threads in the thread pool can have different processing speeds for the second data packet. In other words, the time when the second data packet obtained first is processed can be later than the second data packet obtained later. Therefore, the processed second data can be sorted according to the identifier of the processed second data packet according to the preset rule, so that the order of the sorted processed second data packets conforms to the order of obtaining the second data packets. Ensure the accuracy of physiological data. For example, the processed second data packets are sorted as the second data packet No. 5 and the second data packet No. 7. In other words, the second data packet No. 5 and the second data packet No. 7 have been processed and sorted. After the second data packet No. 6 is processed, the processed second data packets are sorted as the second data packet No. 5, the second data packet No. 6, and the second data packet No. 7. It can be understood that the sorting of the processed second data packets can be sorted according to the identifier of the second data packet, according to the order of obtaining the second data packets, rather than according to the order of completion of the second data packets.
[0041] In step S1700, the second data packet that has been processed after the sorting is displayed on the host computer front end. The sorted second data packet that has been processed can be sent to the host computer front end in sequence in the order of sorting for display. The host computer front end can be a component with a display function in the host computer, such as a display. The host computer front end can render the physiological data in the processed second data packet sent by the host computer control module for display. The physiological data can be displayed in different channels. Optionally, after the physiological data in a second data packet is displayed on the host computer front end, the next data packet in the sorted second data packet that has been processed can be sent to the host computer front end.
[0042] The above technical solution sets the second data packets with identifiers that conform to the preset rules in sequence, sorts them according to the identifiers after processing, and sends the sorted and processed second data packets to the host computer front end for display. This ensures the accuracy of the processed physiological data, avoids disordered order, and facilitates users to analyze physiological data.
[0043] Exemplarily, step S1700 specifically includes: step S1710 and step S1720 for displaying the sorted processed second data packet on the host computer front end. In step S1710, according to the identifier of the currently displayed second data packet and the sorted processed second data packet, it is determined whether the identifier of the next processed second data packet meets the preset rule. In some embodiments, after the host computer front end completes the display of the currently displayed second data packet, the next processed second data packet in the sorted processed second data packet is sent to the host computer front end as the new currently displayed second data packet for display. According to the identifier of the currently displayed second data packet and the sorted processed second data packet, it is determined whether the identifier of the next processed second data packet meets the preset rule. For example, the identifier of the currently displayed second data packet is 5, that is, the currently displayed second data packet No. 5, the corresponding identifier of the next processed second data packet that meets the preset rule should be 6. It can be determined whether the identifier of the next processed second data packet is 6 in the sorted processed second data packet. If it is 6, then whether the identifier of the next processed second data packet meets the preset rule. Otherwise, it does not comply.
[0044] In step S1720, if the preset rule is met, the next second data packet that has been processed is updated to the second data packet currently displayed, so that the host computer front end displays it according to the second data packet currently displayed. If the identifier of the next second data packet that has been processed meets the preset rule, when the second data packet currently displayed by the host computer front end has been displayed, the next second data packet that has been processed can be sent to the host computer front end and updated to the second data packet currently displayed, so that the host computer front end displays it according to the updated second data packet currently displayed.
[0045] The above technical solution determines whether the identifier of the next processed second data packet meets the preset rule, and updates it to the currently displayed second data packet if it meets the rule, thereby ensuring that the order of displaying the second data packets meets the order of obtaining the second data packets, avoiding display confusion, and improving display accuracy.
[0046] Exemplarily, the second data packet is processed using one of the multiple threads, including step S1420 of performing a first downsampling process on the second data packet. The first downsampling process can be performed on the second data packet using a thread in a thread pool. The physiological data of all sampling channels of each sampling module in the second data packet can be downsampled using the first downsampling method, and a second data packet that has been processed by the first downsampling process can be obtained.
[0047] Step S1700, displaying the sorted and processed second data packet on the upper computer front end, includes: step S1730, step S1740, step S1750 and step S1760.
[0048] In step S1730, the first waveform of each sampling channel is displayed according to the physiological data sampled by each sampling channel of each sampling module in the second data packet after the first downsampling process. The host computer front end can provide a first interface for displaying the first waveform. The physiological data of each sampling channel in the first data packet after the first downsampling process can be rendered to display the first waveform of the physiological data corresponding to each sampling channel. The horizontal axis of the first waveform can be the order of sampling of the physiological data after the first downsampling process, that is, the sampling time. The vertical axis of the first waveform can be the value of the physiological data after the first downsampling process. The first waveform can be an intuitive and visual presentation of the changes in the physiological data in the second data packet after the first downsampling process in the time dimension. Since the physiological data in the second data packet after the first downsampling process retains the characteristics of the physiological data, the first waveform can display these characteristics, which is convenient for users to analyze and judge.
[0049] In step S1740, in response to the user's selection operation on the first waveform of the target sampling channel, the unprocessed physiological data corresponding to the sampling of the target sampling channel is determined. As described above, the first waveform of each sampling channel can be displayed in the first interface. The user can select the first waveform of the target sampling channel through a mouse, keyboard, touch screen, etc. as needed. After the host computer front end receives the user's selection operation, it can be determined that a certain sampling channel among all the sampling channels is selected as the target sampling channel. The unprocessed physiological data corresponding to the sampling of the target sampling channel can be determined according to the target sampling channel. In some embodiments, the unprocessed physiological data corresponding to the first waveform currently displayed by the target sampling channel can be obtained. In other words, the unprocessed physiological data includes the unprocessed physiological data of the first waveform currently being displayed, and does not include the unprocessed physiological data of the first waveform that is not displayed in history. In other embodiments, all the corresponding unprocessed physiological data of the target sampling channel can be obtained. In other words, the unprocessed physiological data can include the unprocessed physiological data corresponding to the first waveform currently displayed, and can also include the unprocessed physiological data of the first waveform that is not displayed in history.
[0050] In step S1750, the unprocessed physiological data corresponding to the target sampling channel is subjected to a second downsampling process to obtain downsampled physiological data, wherein the second downsampling process is different from the downsampling method of the first downsampling process. The downsampling method of the second downsampling process is different from the method of the first downsampling process. The first downsampling process and the second downsampling process can obtain different characteristics of the physiological data. For example, the physiological data after the first downsampling process can retain the global characteristics of the physiological data. The downsampled physiological data obtained by the second downsampling process can retain the local characteristics of the physiological data. For example, the first downsampling process can adopt a dynamic interval to take the maximum and minimum values. In other words, after the first downsampling process, each downsampled sampling point corresponds to two values. The second downsampling process can make each downsampled sampling point correspond to one value. The unprocessed physiological data corresponding to the target sampling channel is subjected to a second downsampling process using the second downsampling method to obtain the downsampled physiological data. It can be understood that due to the different downsampling methods, the downsampled physiological data can be different from the physiological data corresponding to the target sampling channel in the second data packet after the first downsampling process.
[0051] In step S1760, the second waveform of the target sampling channel is displayed according to the downsampled physiological data. In some embodiments, the second waveform of the target sampling channel rendered according to the downsampled physiological data can be displayed at the display position of the first waveform corresponding to the target sampling channel in the above-mentioned first interface. In other embodiments, a second interface can be provided, in which the second waveform of the target sampling channel is displayed according to the downsampled physiological data. It can be understood that due to different downsampling methods, the downsampled data after the second downsampling process may be different from the physiological data after the first downsampling process. Thus, the first waveform and the second waveform of the target sampling channel may be different. The first waveform and the second waveform can display different characteristics of the physiological data corresponding to the target sampling channel, which is convenient for users to process and analyze.
[0052] The above technical solution displays the first waveform for the first physiological data of each sampling channel in the second data packet after the first downsampling process, responds to the user's selection operation of the first waveform of the target sampling channel, determines the unprocessed physiological data corresponding to the target sampling channel, performs the second downsampling process on it, and displays it. The second downsampling process is different from the downsampling method of the first downsampling process. Therefore, the dynamic combination of the first downsampling process and the second downsampling process can not only display the global characteristics of the physiological data, but also clearly display the local characteristics of the physiological data, thereby improving the accuracy of physiological data analysis and monitoring.
[0053] Exemplarily, before a preset number of first data packets are input as second data packets into a thread pool including multiple threads, the multi-channel physiological data sampling method also includes: the host computer control module performs filtering processing, common average reference processing and phase detection processing on the physiological data corresponding to the second data packet. Before the second data packet is input into the thread pool for processing, the physiological data in the second data packet can be filtered to remove the data that does not meet the requirements in the physiological data of the second data packet, thereby improving the quality of the physiological data. The physiological data of the second data packet can also be processed with a common average reference, so that the physiological data of different channels of the second data packet can better reflect their local and differential characteristics. The physiological data in the second data packet can be processed with phase detection to obtain the corresponding phase, so as to determine the sequence relationship and synchronization between the physiological data, etc., so as to facilitate processing and analysis.
[0054] The above technical solution performs filtering, common average reference and phase detection processing on the physiological data corresponding to the second data packet before inputting the second data packet into the thread pool for processing, thereby improving the quality of the physiological data of the second data packet and thus improving the quality of the processed physiological data.
[0055] Exemplarily, before a preset number of first data packets are input as second data packets into a thread pool including multiple threads, the multi-channel physiological data sampling method further includes: step S1800, the host computer control module time-aligns the physiological data of all sampling channels of all sampling modules in each second data packet. Before the second data packet is input into the thread pool, each second data packet can be time-aligned. When the multiple sampling channels of each sampling module collect physiological data, due to various reasons, the physiological data sampled by some sampling channels may not be aligned with the physiological data sampled by the remaining sampling channels. In other words, there is a time deviation in the physiological data collected simultaneously by different sampling channels. In some embodiments, the physiological data of a certain sampling channel can be used as a reference, and the physiological data of the remaining sampling channels can be aligned with the physiological data of the sampling channel to achieve time alignment of the physiological data of all sampling channels of all sampling modules. In other embodiments, the physiological data of all sampling channels of all sampling modules can be time-aligned according to the reference sampling time.
[0056] The above technical solution performs time alignment on the physiological data of all sampling channels of all sampling modules in each second data packet before the second data packet is input into the thread pool, thereby ensuring the accuracy of the physiological data in time, facilitating subsequent processing and analysis, and improving the user experience.
[0057] Exemplarily, the second control module sends the corresponding at least one of the first data packets to the host computer control module in sequence, including step S1210, the second control module also stores a timestamp in each first data packet; and sends the first data packet with the timestamp to the host computer control module. The second control module can timestamp the first data packet according to the time of each first data packet it obtains, and can store the timestamp in the first data packet. The timestamp can represent the time of each physiological data in the first data packet. After storing the timestamp in the first data packet, the second control module sends the first data packet with the timestamp stored to the host computer control module.
[0058] Step S1800 , the host computer control module time-aligns the physiological data of all sampling channels of all sampling modules in each second data packet, including: step S1810 and step S1820 .
[0059] In step S1810, the host computer control module determines the first data packet obtained first among the preset number of first data packets corresponding to each second data packet. The host control module can sequentially obtain multiple first data packets, and when the number of first data packets obtained meets the preset number, the first data packets meeting the preset number are used as second data packets. The first data packet obtained first among the second data packets can be determined.
[0060] In step S1820, the physiological data of all sampling channels of all sampling modules are time-aligned according to the timestamp of the physiological data of the first data packet first acquired and the sampling rates of different sampling modules. In some embodiments, the sampling rates of the sampling modules may be different. The time reference may be determined according to the timestamp in the first data packet first acquired and the sampling rate of the sampling module corresponding to the first data packet. The physiological data of the first data packet corresponding to the remaining sampling modules in the second data packet are time-aligned with the time reference so that the sampling time of the physiological data of all sampling channels of all sampling modules is the same without deviation. In other embodiments, the sampling rates of all sampling modules may be the same, and the physiological data of the sampling module corresponding to the first data packet in the second data packet may be used as the time reference according to the timestamp of the first data packet first acquired, and the corresponding physiological data of the remaining sampling modules may be time-aligned with the physiological data corresponding to the sampling module.
[0061] In the above technical solution, a timestamp is stored in the first data packet, and the physiological data is time-aligned according to the timestamp of the physiological data of the first data packet first obtained in the second data packet and the sampling rates of different sampling modules. This ensures the accuracy of the physiological data, avoids errors, and improves the accuracy of subsequent processing and analysis.
[0062] In the above embodiment, each sampling module includes an analog-to-digital conversion module, and the first control module simultaneously obtains and saves the physiological data sampled by multiple sampling channels of each sampling module in the multiple sampling modules, specifically including: the first control module obtains the trigger signal sent by the analog-to-digital conversion module according to the preset sampling rate; according to the trigger signal, obtains and stores the sampling data after the analog-to-digital conversion of the sampled physiological signal by the analog-to-digital conversion module; reads the stored sampling data according to the target sampling rate to obtain the target sampling data as the sampled physiological data; wherein the difference between the sampling rate and the target sampling rate is less than the first threshold value.
[0063] In actual applications, it is found that since it is difficult for the analog-to-digital conversion module to accurately send a trigger signal according to the preset sampling rate, the number of sampling points of the sampled data obtained within a fixed time length is unstable. Specifically, the target sampling rate can be 16500 Hz, and the preset sampling rate can be 16000 Hz. Within the sampling time of 1 second, the number of sampling points of the sampled data obtained and stored may be 15990 or 16005. However, the number of sampling points of the stored sampled data read according to the target sampling rate requires 16500.
[0064] Since the amount of physiological data is usually large as the sampling time goes by, in the prior art, the data of the sampling points is inaccurate, and the deviation of the number of sampling points will accumulate over time to cause a large error in the number of sampling points, which does not meet the requirements of high real-time performance in the field of physiological data. When the difference between the target sampling rate and the preset sampling rate is less than the first threshold, the stored sampling data is read according to the target sampling rate, and the repeated reading of the sampling data or the redundant sampling data that is not read in the stored sampling data accounts for a small proportion of the stored sampling data, that is, the analog-to-digital conversion module will not do a lot of unnecessary calculations, nor will it greatly affect the accuracy of the data; and as the sampling time goes by, no large errors will accumulate. It is particularly suitable for the field of physiological data, where the amount of physiological data sampled is large and the sampling time alignment requirements are high, the sampling data amount requirements are strict, and the sampling data value at a certain sampling moment is relatively low.
[0065] The preset sampling rate is greater than the target sampling rate. Under the same duration, the number of sampling points acquired and stored is relatively large, while the number of sampling points required to read the stored sampling data according to the target sampling rate is relatively small, so only part of the stored sampling data needs to be read, and the same sampling data will not be read repeatedly multiple times. Specifically, the preset sampling rate can be 16000 Hz, and within a sampling duration of 1 second, the number of sampling points of the corresponding stored sampling data is 16,000. The target sampling rate can be 14000 Hz, and the number of sampling points required is 14,000. Therefore, according to the target sampling rate, 14,000 sampling points of the stored sampling data can be read at the corresponding time, without reading the non-corresponding parts at other times. In other words, the target sampling data only includes part of the sampling data.
[0066] Illustratively, according to yet another aspect of the present invention, a multi-channel physiological data sampling system is also provided. Figure 2 FIG. 4 is a schematic block diagram of a multi-channel physiological data sampling system according to an embodiment of the present invention. Figure 2 As shown, the multi-channel physiological data sampling system includes a plurality of sampling modules 210 , a first control module 220 , a second control module 230 and a host computer control module 240 .
[0067] Each sampling module in the plurality of sampling modules 210 includes a plurality of sampling channels for sampling physiological data. The sampling module may include an analog-to-digital conversion module and a collection device connected to each sampling channel. The first control module 220 is used to simultaneously acquire and save the physiological data sampled by the plurality of sampling channels of each sampling module in the plurality of sampling modules, and when the accumulation of the physiological data sampled by each sampling module meets the preset conditions, the physiological data of the sampling module at this time is packaged into a first data packet. The first control module may be implemented using an FPGA. The second control module 230 is used to interact with the first control module when the physiological data sampled by at least one sampling module meets the preset conditions, so as to acquire at least one corresponding first data packet, and send the corresponding at least one first data packet to the host computer control module in sequence. The second control module may include an ARM processor. The host computer control module 240 is used to acquire the first data packet in sequence, and sort the plurality of first data packets acquired in succession according to the preset order of the plurality of sampling modules, so as to obtain the physiological data sampled by all sampling channels on all sampling modules that change over time. The host computer control module may include a personal computer, a server, a workstation, etc.
[0068] A person skilled in the art may understand the specific implementation scheme and beneficial effects of the multi-channel physiological data sampling system by reading the above description of the multi-channel physiological data sampling method, which will not be described in detail here for the sake of brevity.
[0069] Although example embodiments have been described herein with reference to the accompanying drawings, it should be understood that the above example embodiments are merely exemplary and are not intended to limit the scope of the present application to this. Those of ordinary skill in the art may make various changes and modifications therein without departing from the scope and spirit of the present application. All these changes and modifications are intended to be included within the scope of the present application as required by the appended claims.
[0070] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel 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 this application.
[0071] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed.
[0072] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0073] Similarly, it should be understood that in order to streamline the present application and help understand one or more of the various inventive aspects, in the description of the exemplary embodiments of the present application, the various features of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, the method of the present application should not be interpreted as reflecting the following intention: the claimed application requires more features than the features clearly stated in each claim. More specifically, as reflected in the corresponding claims, the inventive point is that the corresponding technical problem can be solved with features less than all the features of a single disclosed embodiment. Therefore, the claims following the specific embodiment are hereby explicitly incorporated into the specific embodiment, wherein each claim itself serves as a separate embodiment of the present application.
[0074] It will be understood by those skilled in the art that, except for mutually exclusive features, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this specification may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature that provides the same, equivalent or similar purpose.
[0075] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present application and form different embodiments. For example, in the claims, any one of the claimed embodiments can be used in any combination.
[0076] The various component embodiments of the present application can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or a digital signal processor (DSP) can be used in practice to implement some or all of the functions of some modules in the multi-channel physiological data sampling system according to the embodiment of the present application. The present application can also be implemented as a system program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing the present application can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0077] It should be noted that the above embodiments illustrate the present application rather than limit the present application, and that those skilled in the art may design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets should not be constructed as a limitation to the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of multiple such elements. The present application may be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In a unit claim that lists several devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names.
[0078] The above is only a specific implementation or description of a specific implementation of the present application, and the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. The protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A multi-channel physiological data sampling method, characterized in that: The first control module simultaneously acquires and saves physiological data sampled by multiple sampling channels of each sampling module in the multiple sampling modules, and when the accumulation of physiological data sampled by each sampling module meets the preset conditions, packs the physiological data of the sampling module at this time into a first data packet; The second control module starts interacting with the first control module when the physiological data sampled by at least one sampling module meets the preset conditions, so as to obtain at least one corresponding first data packet, and sequentially send the at least one corresponding first data packet to the upper computer control module; The host computer control module sequentially acquires the first data packets, and sorts each of the first data packets that are continuously acquired and correspond to the multiple sampling modules in a preset order of the multiple sampling modules, so as to obtain the physiological data sampled by all sampling channels on all sampling modules that change with time.
2. The multi-channel physiological data sampling method according to claim 1, characterized in that: The multi-channel physiological data sampling method also includes: Whenever a preset number of first data packets are accumulated, the host computer control module inputs the preset number of first data packets as second data packets into a thread pool including multiple threads, and processes the second data packets using one thread among the multiple threads.
3. The multi-channel physiological data sampling method according to claim 2, characterized in that: Before inputting the preset number of first data packets as second data packets into a thread pool including a plurality of threads, the multi-channel physiological data sampling method further includes: The host computer control module sequentially sets identifiers that conform to a preset rule for the second data packets according to the order in which the second data packets are obtained; After processing the second data packet by using one of the multiple threads, the multi-channel physiological data sampling method further includes: The host computer control module sorts all the processed second data packets according to the identifiers of the processed second data packets according to the preset rule; The second data packet that has been processed after the sorting is displayed on the upper computer front end.
4. The multi-channel physiological data sampling method according to claim 3, characterized in that: The displaying of the processed second data packet after the sorting on the host computer front end specifically includes: According to the identifier of the currently displayed second data packet and the sorted and processed second data packet, determining whether the identifier of the next processed second data packet meets the preset rule; In the case of meeting the preset rule, the next second data packet that has been processed is updated as the currently displayed second data packet, so that the host computer front end performs display according to the currently displayed second data packet.
5. The multi-channel physiological data sampling method according to claim 2, characterized in that: Whenever a preset number of first data packets are accumulated, the preset number of first data packets are input as second data packets into a thread pool including a plurality of threads, and one thread among the plurality of threads is used to process the second data packet, including: For each thread, the physiological data corresponding to the second data packet processed by the thread is processed in sequence according to the preset order of the sampling channels of the physiological data until the physiological data sampled by all the sampling channels are processed.
6. The multi-channel physiological data sampling method according to claim 2, characterized in that: The processing of the second data packet by using one of the multiple threads includes: Down-sampling processing is performed on the second data packet using one of the multiple threads.
7. The multi-channel physiological data sampling method according to claim 6, characterized in that: Before inputting the preset number of first data packets as second data packets into a thread pool including a plurality of threads, the multi-channel physiological data sampling method further includes: The host computer control module performs filtering processing, common average reference processing and phase detection processing on the physiological data corresponding to the second data packet.
8. The multi-channel physiological data sampling method according to claim 2, characterized in that: Before inputting the preset number of first data packets as second data packets into a thread pool including a plurality of threads, the multi-channel physiological data sampling method further includes: The host computer control module time-aligns the physiological data of all sampling channels of all sampling modules in each of the second data packets.
9. The multi-channel physiological data sampling method according to claim 8, characterized in that: The second control module sequentially sends at least one of the first data packets to the host computer control module, specifically including: The second control module also stores a timestamp in each first data packet; and sends the first data packet with the timestamp to the host computer control module; The step of time aligning the physiological data of all sampling channels of all sampling modules in each of the second data packets specifically includes: The host computer control module determines the first data packet first obtained from the preset number of first data packets corresponding to each second data packet; According to the timestamp of the physiological data of the first data packet acquired first and the sampling rates of different sampling modules, the physiological data of all sampling channels of all sampling modules are time-aligned.
10. The multi-channel physiological data sampling method according to claim 3, characterized in that: The processing of the second data packet by using one of the multiple threads includes: performing a first downsampling process on the second data packet; The second data packet that has been processed after the sorting is displayed on the host computer front end, including: Displaying the first waveform sampled by each sampling channel according to the physiological data sampled by each sampling channel of each sampling module in the second data packet after the first down-sampling process is completed; In response to a user's selection operation of a first waveform of a target sampling channel, determining corresponding unprocessed physiological data sampled by the target sampling channel; Performing a second downsampling process on an unprocessed second data packet corresponding to the target sampling channel to obtain downsampled physiological data, wherein the second downsampling process is different from the first downsampling process in a downsampling manner; A second waveform of the target sampling channel is displayed according to the down-sampled physiological data.
11. The multi-channel physiological data sampling method according to claim 1, characterized in that: Each sampling module includes an analog-to-digital conversion module. The first control module simultaneously acquires and saves physiological data sampled by multiple sampling channels of each sampling module in the multiple sampling modules, specifically including: The first control module obtains a trigger signal sent by the analog-to-digital conversion module at a preset sampling rate; according to the trigger signal, obtains and stores sampling data after the analog-to-digital conversion module performs analog-to-digital conversion on the sampled physiological signal; reads the stored sampling data at a target sampling rate to obtain target sampling data as sampled physiological data; Wherein, a difference between the preset sampling rate and the target sampling rate is less than a first threshold.
12. A multi-channel physiological data sampling system, characterized in that: include: A plurality of sampling modules, a first control module, a second control module and a host computer control module, wherein: Each of the plurality of sampling modules comprises a plurality of sampling channels for sampling physiological data; The first control module is used to simultaneously acquire and save physiological data sampled by multiple sampling channels of each sampling module in the multiple sampling modules, and when the accumulation of physiological data sampled by each sampling module meets the preset conditions, the physiological data of the sampling module at this time is packaged into a first data packet; The second control module is used to start interacting with the first control module when the physiological data sampled by at least one sampling module meets the preset conditions, so as to obtain at least one corresponding first data packet, and send the corresponding at least one first data packet to the host computer control module in sequence; The host computer control module is used to acquire the first data packets in sequence, and sort the multiple first data packets that are continuously acquired corresponding to multiple sampling modules according to the preset order of the multiple sampling modules, so as to obtain the physiological data sampled by all sampling channels on all sampling modules that change with time.
Citation Information
Cited By
Physiological signal data transmission method, electronic equipment and medium
CN121603441A