Physiological signal data transmission method, electronic equipment and medium
By defining the target data processing model in the edge device and sampling the initial data packets, the problem of excessive load on the edge device is solved, and the amount of data is reduced while the processing efficiency is improved.
Patent Information
- Application Number
- CN202511632890.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-07
- Publication Date
- 2026-03-03
AI Technical Summary
Edge devices generate massive amounts of data and have heavy workloads due to the multi-channel and high sampling frequency characteristics of physiological signal data.
The electronic device determines the target data processing model corresponding to the target physiological signal acquisition device from multiple data processing models, obtains the initial data packet, samples it based on the sampling method, reduces the amount of data, and then transmits it to the edge device.
This reduces the load on edge devices, ensures that the transmitted physiological signal data matches the requirements of the target data processing model, and improves processing efficiency.
Smart Images

Figure CN121603441A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the fields of human factors engineering and cross-platform data transmission technology, and in particular to a method, electronic device and medium for transmitting physiological signal data. Background Technology
[0002] With the development of wearable devices and sensing technologies, the acquisition and processing of physiological signal data has been widely applied in fields such as medical health, sports training, and sleep monitoring. Among these applications, cross-platform data transmission between the data acquisition terminal and the edge device that processes the physiological signal data is crucial.
[0003] In related technologies, physiological signal acquisition devices transmit the acquired physiological signal data to edge devices. However, due to the characteristics of physiological signal data, such as multi-channel and high sampling frequency, the amount of physiological signal data acquired by the physiological signal acquisition device is huge. Therefore, the amount of data transmitted by the physiological signal acquisition device to the edge device is large, resulting in a large load on the edge device. Summary of the Invention
[0004] One of the technical problems that this disclosure aims to solve is the high load on edge devices.
[0005] To address the aforementioned technical problems, embodiments of this disclosure provide a method, electronic device, and medium for transmitting physiological signal data.
[0006] In a first aspect, embodiments of this disclosure provide a method for transmitting physiological signal data, applied to an electronic device. The method includes: determining a target data processing model corresponding to a target physiological signal acquisition device from multiple data processing models of an edge device, wherein the target data processing model refers to a data processing model intended to process physiological signal data acquired by the target physiological signal acquisition device; the target physiological signal acquisition device is one of multiple physiological signal acquisition devices connected to the electronic device; acquiring multiple initial data packets, wherein the initial data packets include physiological signal data acquired by the target physiological signal acquisition device; acquiring a sampling method for the initial data packets, and sampling the multiple initial data packets based on the sampling method to obtain target physiological signal data; transmitting the target physiological signal data to the edge device so that the target data processing model processes the target physiological signal data.
[0007] In some embodiments, obtaining the sampling method for multiple initial data packets includes: determining the expected number of samples for physiological signal data sampling from any initial data packet; if the expected number of samples is greater than a set threshold, determining the sampling method includes: sampling each initial data packet and sampling each initial data packet at least twice; if the expected number of samples is less than or equal to the set threshold, determining the sampling method includes: sampling each initial data packet at most once.
[0008] In some embodiments, the method further includes: obtaining the original number of reference physiological signal data contained in the initial data packet, wherein the reference physiological signal data is physiological signal data acquired by a data acquisition channel of the target physiological signal acquisition device; obtaining a first sampling number based on the ratio of the original number to the expected sampling number; sampling each initial data packet, and sampling each initial data packet at least twice, including: in any initial data packet, performing a physiological signal data sampling once according to the first sampling number.
[0009] In some embodiments, the method further includes: obtaining the original transmission rate of the target physiological signal acquisition device to the initial data packet and the expected reception rate of the target data processing model to the initial data packet; obtaining a second quantity based on the ratio of the original transmission rate to the expected reception rate; and sampling each initial data packet at most once, including: performing physiological signal data sampling once for every second quantity of initial data packets in the plurality of initial data packets.
[0010] In some embodiments, determining the desired number of physiological signal data samples from any initial data packet includes: acquiring the original sampling frequency of the physiological signal data from the target physiological signal acquisition device, and the original number of reference physiological signal data contained in the initial data packet, wherein the reference physiological signal data is physiological signal data acquired by a data acquisition channel of the target physiological signal acquisition device; acquiring the desired reception frequency of the physiological signal data from the target data processing model; acquiring the ratio of the desired reception frequency to the original sampling frequency; and determining the desired number of physiological signal data samples from any initial data packet based on the product of the ratio and the original number.
[0011] In some embodiments, there are multiple target data processing models; obtaining the expected reception frequency of physiological signal data by the edge device includes: obtaining multiple expected frequencies, wherein any one expected frequency is the frequency at which the corresponding target data processing model expects to receive physiological signal data; and determining the expected reception frequency of physiological signal data by the multiple target data processing models based on the maximum value of the multiple expected frequencies.
[0012] In some embodiments, transmitting target physiological signal data to a target data processing model in an edge device includes: obtaining a desired buffer size and allocating a target buffer based on the desired buffer size, wherein the desired buffer size is the buffer size desired by the target data processing model; writing the target physiological signal data into the target buffer and obtaining multiple target data packets, wherein the target data packets are data packets obtained by packaging the target physiological signal data in the target buffer after the target buffer is full; and transmitting the multiple target data packets to the edge device so that the target data processing model processes the target physiological signal data.
[0013] In some embodiments, obtaining the expected buffer size includes: obtaining the expected data packet size, which is the size of the data packets that the target data processing model expects to obtain after sampling; obtaining the expected number of data packets, which is the number of data packets in the buffer that the target data processing model expects; and obtaining the expected buffer size based on the product of the expected data packet size and the expected number of data packets.
[0014] In some embodiments, the data packet obtained after sampling includes at least one physiological signal data and a timestamp for each physiological signal data; obtaining the expected data packet size includes: obtaining the expected data size, which is the sum of the sizes of all physiological signal data included in the data packet obtained after sampling as expected by the target data processing model; obtaining the expected timestamp size, which is the sum of the sizes of all timestamps included in the data packet obtained after sampling as expected by the target data processing model; and obtaining the expected data packet size based on the sum of the expected data size and the expected timestamp size.
[0015] In some embodiments, obtaining the desired data size includes: obtaining the desired number of channels, which is the number of data acquisition channels expected by the target data processing model; and obtaining the desired data size based on the product of the desired number of samples, the desired number of channels, and the size of the physiological signal data sampled from any initial data packet.
[0016] In some embodiments, obtaining the desired number of data packets includes: obtaining the desired number of data packets based on the product of a preset push frequency and the original transmission rate of the initial data packets; wherein the push frequency is less than 1.
[0017] In some embodiments, the multiple data processing models include at least one of an emotion recognition model, a fatigue detection model, and an automatic eye-tracking mapping model; the method specifically includes: determining the target signal acquisition device corresponding to the physiological signal data required for data processing by any data processing model in the edge device, wherein the target physiological signal acquisition device includes one of an electroencephalogram (EEG) signal acquisition device, an electrocardiogram (ECG) signal acquisition device, an electromyogram (EMG) signal acquisition device, and an eye-tracking signal acquisition device; acquiring multiple initial data packets generated by any target physiological signal acquisition device based on the acquired physiological signal data; acquiring the sampling method of the initial data packets, and sampling the physiological signal data in any initial data packet based on the sampling method to obtain the target physiological signal data corresponding to any initial data packet; and transmitting the target physiological signal data to the target data processing model based on the correspondence between the target physiological signal acquisition device and the target data processing model, so that the target data processing model processes the corresponding target physiological signal data.
[0018] Secondly, embodiments of this disclosure provide a physiological signal data transmission device, comprising: a first acquisition module, configured to determine a target data processing model corresponding to a target physiological signal acquisition device from multiple data processing models of an edge device, wherein the target data processing model refers to a data processing model intended to process physiological signal data acquired by the target physiological signal acquisition device; the target physiological signal acquisition device is one of multiple physiological signal acquisition devices connected to an electronic device; a second acquisition module, configured to acquire multiple initial data packets, wherein each initial data packet includes physiological signal data acquired by the target physiological signal acquisition device; a processing module, configured to acquire a sampling method for the multiple initial data packets, and sample the multiple initial data packets based on the sampling method to obtain target physiological signal data; and a transmission module, configured to transmit the target physiological signal data to the edge device so that the target data processing model processes the target physiological signal data.
[0019] Thirdly, embodiments of this disclosure provide an electronic device, including a processor and a memory, wherein the memory stores a program that can run on the processor, and when the program is executed by the processor, it implements a method for transmitting physiological signal data as described in any of the first aspects above.
[0020] Fourthly, embodiments of this disclosure provide a computer-readable storage medium on which a program is stored, and when the program is executed by a processor, it implements a method for transmitting physiological signal data as described in any of the first aspects.
[0021] Through the above technical solution, the physiological signal data transmission method, electronic device, and medium provided in this disclosure determine the target data processing model corresponding to the target physiological signal acquisition device from multiple data processing models of the edge device through the electronic device. The target data processing model refers to a data processing model that is expected to process the physiological signal data acquired by the target physiological signal acquisition device. The target physiological signal acquisition device is one of multiple physiological signal acquisition devices connected to the electronic device. Multiple initial data packets are acquired, each initial data packet including the physiological signal data acquired by the target physiological signal acquisition device. A sampling method for the multiple initial data packets is acquired, and the multiple initial data packets are sampled based on the sampling method to obtain the target physiological signal data. The target physiological signal data is transmitted to the edge device so that the target data processing model can process the target physiological signal data. Therefore, by sampling, the electronic device reduces the amount of physiological signal data received by the edge device from the electronic device, thereby reducing the load on the edge device. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 This is a schematic diagram of the structure of a physiological signal data transmission system disclosed in an embodiment of this disclosure; Figure 2 This is a schematic flowchart of a method for transmitting physiological signal data disclosed in an embodiment of this disclosure; Figure 3 This is a schematic flowchart of another method for transmitting physiological signal data disclosed in this embodiment; Figure 4 This is a schematic flowchart of another method for transmitting physiological signal data disclosed in this embodiment; Figure 5 This is a schematic flowchart of another method for transmitting physiological signal data disclosed in this embodiment; Figure 6 This is a schematic flowchart of another method for transmitting physiological signal data disclosed in this embodiment; Figure 7 This is a schematic flowchart of another method for transmitting physiological signal data disclosed in this embodiment; Figure 8 This is a schematic flowchart of another method for transmitting physiological signal data disclosed in this embodiment; Figure 9 This is a block diagram of a physiological signal data transmission device disclosed in an embodiment of this disclosure; Figure 10 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this disclosure. Detailed Implementation
[0024] The embodiments of this disclosure will be further described in detail below with reference to the accompanying drawings and examples. The detailed description of the embodiments and the accompanying drawings are used to illustrate the principles of this disclosure by way of example, but should not be used to limit the scope of this disclosure. This disclosure can be implemented in many different forms and is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.
[0025] These embodiments are provided to make the disclosure thorough and complete, and to fully express the scope of the disclosure to those skilled in the art. It should be noted that, unless otherwise specifically stated, the relative arrangement of components and steps, material composition, numerical expressions, and values set forth in these embodiments should be interpreted as exemplary only and not as limiting.
[0026] All terms used in this disclosure have the same meaning as understood by one of ordinary skill in the art to which this disclosure pertains, unless otherwise specifically defined. It should also be understood that terms defined in general dictionaries should be interpreted as having meanings consistent with their meanings in the context of the relevant art, and not as idealized or highly formalized, unless expressly defined herein.
[0027] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, they should be considered part of the specification.
[0028] The physiological signal data involved in this disclosure are various measurable signal data in the human body, including but not limited to: electrocardiogram (ECG) signal, skin temperature (SKT) signal, photoplethysmogram (PPG) signal, electrodermal activity (EDA) signal, heart rate (HR) signal, electromyogram (EMG) signal, electroencephalogram (EEG) signal, and peripheral capillary oxygen saturation (SPO2) signal.
[0029] With the development of wearable devices and sensing technologies, the acquisition and processing of physiological signal data has been widely applied in fields such as medical health, sports training, and sleep monitoring. Among these applications, cross-platform data transmission between the data acquisition terminal and the edge device that processes the physiological signal data is crucial.
[0030] In related technologies, physiological signal acquisition devices transmit the acquired physiological signal data to edge devices. However, due to the characteristics of physiological signal data, such as multi-channel and high sampling frequency, the amount of physiological signal data acquired by physiological signal acquisition devices is huge, resulting in a large amount of data received by edge devices from physiological signal acquisition devices, leading to a large load on edge devices.
[0031] This disclosure provides a method for transmitting physiological signal data. In this method, an electronic device acquires multiple initial data packets from a target physiological signal acquisition device. Instead of transmitting all the acquired initial data packets to an edge device, the electronic device samples the multiple initial data packets based on a sampling method and transmits the sampled target physiological signal data to the edge device. This reduces the amount of physiological signal data transmitted to the edge device, thereby reducing the amount of physiological signal data received by the edge device and thus lowering the load on the edge device.
[0032] Furthermore, the electronic device determines the target data processing model corresponding to the target physiological signal acquisition device from multiple data processing models of the edge devices. The target data processing model refers to the data processing model expected to process the physiological signal data acquired by the target physiological signal acquisition device, which is one of multiple physiological signal acquisition devices connected to the electronic device. Since the initial data packet includes the physiological signal data acquired by the target physiological signal acquisition device, it can be guaranteed that the physiological signal data transmitted to the edge devices matches the data expected by the target data processing model.
[0033] Cross-platform data transmission refers to the sending, receiving, and analysis of data between different types of hardware devices or operating systems. Electronic devices that serve as physiological signal acquisition terminals include, but are not limited to: computers, embedded devices, mobile phones, tablets, and dedicated medical monitoring equipment hosts.
[0034] The physiological signal data transmission method provided in this disclosure supports the transmission of physiological signal data acquired from physiological signal acquisition devices to different edge devices through different electronic devices, thereby realizing cross-platform physiological signal data transmission.
[0035] Figure 1 This is a schematic diagram of the structure of a physiological signal data transmission system provided in an embodiment of this disclosure, as shown below. Figure 1 As shown, the transmission system 100 includes an electronic device 10 and an edge device 20.
[0036] Electronic device 10 establishes communication connections with physiological signal acquisition device 30 and edge device 20 respectively. The connection methods between electronic device 10 and physiological signal acquisition device 30 include, but are not limited to: Universal Serial Bus (USB) connection, Host Interface Device (HID) connection, or Bluetooth connection.
[0037] The physiological signal acquisition device 30 is used to acquire physiological signal data and transmit the physiological signal data to the electronic device 10. The types of physiological signal acquisition devices 30 include, but are not limited to: electroencephalogram (EEG) signal acquisition device 301, electrocardiogram (ECG) signal acquisition device 302, electromyography (EMG) signal acquisition device 303, and eye movement signal acquisition device 304, etc.
[0038] The type of physiological signal acquisition device 30 determines the type of physiological signal data acquired. For example, if the type of physiological signal acquisition device 30 is electroencephalogram (EEG) signal acquisition device 302, then the physiological signal data acquired by the physiological signal acquisition device 30 is EEG signal data.
[0039] Electronic device 10 is used to receive physiological signal data collected by physiological signal acquisition device, process the physiological signal data, and then transmit the processed physiological signal data to edge device 20.
[0040] Edge device 20 refers to a physical device deployed at the network edge, close to the data source (such as electronic devices and physiological signal acquisition devices), and possessing certain computing capabilities, used to process the physiological signal data transmitted by electronic device 10.
[0041] The technical solution of the physiological signal data transmission method provided in this disclosure is described below with reference to several specific embodiments: Figure 2 This is a flowchart illustrating a method for transmitting physiological signal data according to an embodiment of the present disclosure. This method can be applied to... Figure 1 Electronic device 10 in the transmission system shown, such as Figure 2 As shown, the method of this embodiment is as follows: S21. The electronic device determines the target data processing model corresponding to the target physiological signal acquisition device from multiple data processing models of the edge device.
[0042] The target data processing model refers to the data processing model that is expected to process the physiological signal data collected by the target physiological signal acquisition device; the target physiological signal acquisition device is one of multiple physiological signal acquisition devices connected to the electronic device.
[0043] In some embodiments, the electronic device may select one available physiological signal acquisition device as the target physiological signal acquisition device from among a plurality of connected physiological signal acquisition devices.
[0044] In other embodiments, the electronic device may also specify at least one physiological signal acquisition device among the multiple connected physiological signal acquisition devices according to the user's needs, and determine one available physiological signal acquisition device as the target physiological signal acquisition device among the specified at least one physiological signal acquisition device.
[0045] refer to Figure 1 The edge device has multiple applications installed, including but not limited to: prediction application 201 and face computer vision processing application 202; prediction application 201 may include multiple data processing models for processing physiological signal data to monitor human psychological and physiological states, and the multiple data processing models include at least one of: emotion recognition model, fatigue detection model, and automatic eye-tracking mapping model. Figure 1 Only the prediction application 201 is shown, which includes three data processing models: emotion recognition model, fatigue detection model, and eye-tracking point automatic mapping model. The face computer vision processing application 202 includes a face computer vision processing model.
[0046] In some embodiments, the electronic device can obtain attribute information of each data processing model from the edge device, and determine whether the data processing model is the target data processing model based on the attribute information of the data processing model.
[0047] The attribute information may include: the type of data processing model, the expected type of physiological signal data of the data processing model, the acquisition channel information of the physiological signal acquisition device expected by the data processing model, and the expected frequency of the physiological signal data to be received by the data processing model.
[0048] The expected type of physiological signal data for the data processing model refers to the type of physiological signal data that the data processing model expects to receive. For example, if the data processing model expects to receive EEG signal data, then the expected type of physiological signal data for the data processing model is EEG signal. The expected frequency refers to the amount of physiological signal data expected to be received per unit time. For example, the unit time can be 1 second.
[0049] The acquisition channel information may include the desired channel type and the desired number of data acquisition channels for the physiological signal acquisition device. The desired channel type refers to the type of data acquisition channels the data processing model expects. The desired number of channels refers to the number of data acquisition channels the data processing model expects.
[0050] For each data processing model, if the data processing model meets the target conditions, it can be identified as the target data processing model corresponding to the target physiological signal acquisition device. If the data processing model does not meet the target conditions, it can be determined that the data processing model is not the target data processing model.
[0051] The target conditions may include: the data processing model's desired type of physiological signal data is the same as the type of physiological signal data acquired by the target physiological signal acquisition device; the data processing model's desired data acquisition channel of the target physiological signal acquisition device is the same as the data acquisition channel in the target physiological signal acquisition device; and the data processing model's desired frequency for receiving physiological signal data matches the original sampling frequency of the target physiological signal acquisition device. The original sampling frequency can be represented by the original frequency (originalFreq), which represents the sampling frequency at which the target physiological signal acquisition device acquires physiological signal data.
[0052] The same data acquisition channel can mean that the type of data acquisition channel in the target physiological signal acquisition device is the same as the expected type of data acquisition channel expected by the data processing model, and the number of data acquisition channels in the target physiological signal acquisition device is the same as the expected number of data acquisition channels expected by the data processing model; the expected frequency matching the original sampling frequency can mean that the expected frequency is less than or equal to the original sampling frequency.
[0053] The physiological signal acquisition device has at least one data acquisition channel, each data acquisition channel is used to acquire physiological signal data, and the original sampling frequency of the physiological signal acquisition device refers to the original sampling frequency of each data acquisition channel, and the original sampling frequencies of the at least one data acquisition channel are all the same.
[0054] For example, suppose the target physiological signal acquisition device is an EEG signal acquisition device that acquires EEG signal data. The original sampling frequency of this EEG signal acquisition device is 1024 Hz, and the data acquisition channel of this EEG signal acquisition device includes the left frontal lobe channel. If the emotion recognition model in the edge device expects the physiological signal data to be EEG signal data, with an expected frequency of 512 Hz, and an expected data acquisition channel including the left frontal lobe channel, then because the expected type of physiological signal data of the emotion recognition model is the same as the type of physiological signal data acquired by the EEG signal acquisition device; the expected data acquisition channel of the EEG signal acquisition device is the same as the data acquisition channel in the EEG signal acquisition device; and the expected frequency of the EEG signal data received by the emotion recognition model matches the original sampling frequency of the EEG signal acquisition device, it can be determined that the emotion recognition model is the target data processing model.
[0055] It should be noted that different types of physiological signal acquisition devices may use the same or different data processing models. There may be multiple physiological signal acquisition devices of the same type (such as EEG signal acquisition devices), but the types of data acquisition channels and the number of data acquisition channels may differ. Therefore, the data processing models corresponding to these multiple physiological signal acquisition devices may also differ. Furthermore, the type and number of data acquisition channels uniquely identify a specific physiological signal acquisition device.
[0056] For example, multiple physiological signal acquisition devices of the same type may include a first EEG signal acquisition device and a second EEG signal acquisition device. The first EEG signal acquisition device has four data acquisition channels, including a left frontal lobe channel and a right frontal lobe channel, etc., while the second EEG signal acquisition device has eight data acquisition channels, including a left temporal lobe channel and a right temporal lobe channel, etc. Because the types of data acquisition channels of the first EEG signal acquisition device and the second EEG signal acquisition device are different, and the number of data acquisition channels of the first EEG signal acquisition device and the second EEG signal acquisition device are different, the data processing model corresponding to the first EEG signal acquisition device is different from the data processing model corresponding to the second EEG signal acquisition device.
[0057] In some embodiments, the electronic device can query an edge device containing a prediction application based on a zero-configuration device auto-discovery protocol, and after finding the edge device, obtain the attribute information of each data processing model contained in the prediction application from the edge device. Then, the electronic device can determine whether the data processing model is the target data processing model based on the attribute information of each data processing model.
[0058] Zero-configuration device discovery protocols include, but are not limited to, the multicast Domain Name System (mDNS) protocol and the Simple Service Discovery Protocol (SSDP).
[0059] In some embodiments, an electronic device can query an edge device within a local area network based on the mDNS protocol, and after finding the edge device, obtain attribute information of each data processing model included in the prediction application from the edge device; this process may include the following steps A1 and A2: A1: Electronic devices query edge devices containing predictive applications within a local area network based on the mDNS protocol.
[0060] After connecting to the local area network, edge devices can broadcast their service content based on the mDNS protocol. This service content includes: a list of applications, the device name, and the service interface address. The application list includes identifiers for multiple applications. The service interface address can be a Hypertext Transfer Protocol (HTTP) address.
[0061] In some embodiments, the edge device may broadcast its service content to multicast address 224.0.0.251 and port 5353 based on the mDNS protocol.
[0062] Therefore, electronic devices can query the service content broadcast by edge devices within the local area network based on the mDNS protocol. If the application list in the service content contains a predicted application, the electronic device can determine that the edge device corresponding to the service content is the edge device containing the predicted application; if the application list in the service content does not contain a predicted application, the electronic device can determine that the edge device corresponding to the service content is not the edge device containing the predicted application.
[0063] Because the mDNS protocol does not require DNS server configuration, it enables electronic devices to automatically discover edge devices, thereby reducing the complexity of electronic devices discovering edge devices.
[0064] A2: Electronic devices obtain attribute information of various data processing models contained in the prediction application from edge devices.
[0065] In this process, after an electronic device queries an edge device containing a prediction application within a local area network based on the mDNS protocol, the electronic device can request the attribute information of the data processing model contained in the prediction application by sending a request message to the service interface address of the edge device, since the service content of the edge device includes the service interface address.
[0066] S22: The electronic device acquires multiple initial data packets.
[0067] The initial data packet may include physiological signal data acquired by the target physiological signal acquisition device, which may be acquired by at least one data acquisition channel of the target physiological signal acquisition device.
[0068] The target physiological signal acquisition device can batch package the physiological signal data acquired by at least one data acquisition channel to obtain multiple initial data packets, and transmit the multiple initial data packets to electronic devices.
[0069] S23: The electronic device acquires the sampling method of multiple initial data packets.
[0070] Physiological signal data is characterized by a high sampling frequency, and the computational resources of the data processing model of the edge device may be limited, resulting in a typically low reception frequency for physiological signal data. Therefore, when the target data processing model's desired reception frequency for physiological signal data is lower than the original sampling frequency of the target physiological signal acquisition device, the electronic device can sample multiple initial data packets to reduce the amount of physiological signal data transmitted to the target data processing model. This ensures that the amount of physiological signal data transmitted to the target data processing model per unit time matches the desired reception frequency, thereby saving computational resources for the target data processing model. The desired reception frequency can be represented by the resampling frequency (resampleFreq), which represents the frequency at which the target data processing model receives physiological signal data after the electronic device samples the initial data packets acquired by the target physiological signal acquisition device at the original sampling frequency.
[0071] When there is only one target data processing model, the expected receiving frequency is the expected frequency at which the target data processing model expects to receive physiological signal data.
[0072] When there are multiple target data processing models, the desired reception frequency is the maximum value of the desired frequencies of physiological signal data to be received by the multiple target data processing models.
[0073] The electronic device can sample multiple initial data packets in two ways: each initial data packet is sampled at least twice, or each initial data packet is sampled at most once.
[0074] In some embodiments, the electronic device may pre-store sampling methods for multiple initial data packets.
[0075] In other embodiments, the electronic device may obtain the sampling method for multiple data packets based on the desired number of samples of physiological signal data to be sampled from any initial data packet.
[0076] S24: The electronic device samples multiple initial data packets based on a sampling method to obtain target physiological signal data.
[0077] Electronic devices can sample multiple initial data packets based on a sampling method to obtain target physiological signal data, thereby reducing the amount of physiological signal data acquired from the target physiological signal acquisition device so that the amount of target physiological signal data meets the requirements of the target data processing model.
[0078] S25: The electronic device transmits the target physiological signal data to the edge device so that the target data processing model can process the target physiological signal data.
[0079] In this device, the electronic device can transmit the target physiological signal data to a prediction application in the edge device, so that the prediction application can allocate the target physiological signal data to a target data processing model in the prediction application, so that the target data processing model can process the target physiological signal data.
[0080] Electronic devices can transmit target physiological signal data in batches to predictive applications in edge devices in units of data packets, thereby improving the transmission efficiency and reliability of physiological signal data.
[0081] In some embodiments, when the electronic device automatically discovers the edge device within the local area network based on the mDNS protocol, before transmitting the target physiological signal data to the edge device, the electronic device can also send a model initiation request to the service interface address of the edge device to request the initialization and initiation of the target data processing model in the edge device, and receive the IP address and port returned by the prediction application of the edge device, so that the electronic device can request to establish a communication connection with the prediction application based on the IP address and port, thereby establishing a communication connection between the electronic device and the edge device. The communication connection can be a Transmission Control Protocol (TCP) communication connection.
[0082] Specifically, the electronic device determines the target data processing model corresponding to the target physiological signal acquisition device from multiple data processing models of the edge device. The target data processing model refers to the data processing model expected to process the physiological signal data acquired by the target physiological signal acquisition device. The target physiological signal acquisition device is one of multiple physiological signal acquisition devices set in the electronic device. It acquires multiple initial data packets, each including the physiological signal data acquired by the target physiological signal acquisition device. It then acquires the sampling method for the multiple initial data packets and samples them based on the sampling method to obtain the target physiological signal data. Finally, it transmits the target physiological signal data to the edge device so that the target data processing model can process it. Thus, by sampling, the electronic device reduces the amount of physiological signal data received by the edge device from the electronic device, thereby reducing the load on the edge device.
[0083] In some embodiments of this disclosure, the electronic device determines the target signal acquisition device corresponding to the required physiological signal data when any data processing model in the edge device performs data processing. The target physiological signal acquisition device includes one of an electroencephalogram (EEG) signal acquisition device, an electrocardiogram (ECG) signal acquisition device, an electromyogram (EMG) signal acquisition device, and an eye-tracking signal acquisition device. The electronic device acquires multiple initial data packets generated by any target physiological signal acquisition device based on the acquired physiological signal data. It acquires the sampling method for the initial data packets and samples the physiological signal data in any initial data packet based on the sampling method to obtain the target physiological signal data corresponding to any initial data packet. Based on the correspondence between the target physiological signal acquisition device and the data processing model, the target physiological signal data is transmitted to the data processing model so that the target data processing model processes the corresponding target physiological signal data.
[0084] In some embodiments of this disclosure, before determining the target data processing model corresponding to the target physiological signal acquisition device from multiple data processing models of the edge device, the electronic device may specifically determine the target physiological signal acquisition device from multiple connected physiological signal acquisition devices in the following manner.
[0085] For each physiological signal acquisition device, after establishing a connection with the physiological signal acquisition device, the electronic device can obtain the device information of the physiological signal acquisition device from the physiological signal acquisition device and store the device information.
[0086] The device information may include the identifier of the physiological signal acquisition device, the status of the physiological signal acquisition device, and the type of the physiological signal acquisition device. The identifier of the physiological signal acquisition device includes, but is not limited to: the name of the physiological signal acquisition device, the serial number of the physiological signal acquisition device, the vendor identifier (VID), and the product identifier (PID); the status of the physiological signal acquisition device includes, but is not limited to: available status, unavailable status, on status, and off status.
[0087] The target physiological signal acquisition device can be one of multiple physiological signal acquisition devices that are connected to electronic devices and is in an available state.
[0088] In some embodiments, after establishing a connection with a physiological signal acquisition device, if the status of the acquired physiological signal acquisition device is in an available state in the device information, the electronic device can identify the physiological signal acquisition device as the target physiological signal acquisition device.
[0089] In other embodiments, the electronic device has already established connections with multiple physiological signal acquisition devices before starting up. After the electronic device starts up, since it has already stored the device information of each physiological signal acquisition device after establishing connections with multiple physiological signal acquisition devices, the electronic device can directly obtain the pre-stored multiple device information and determine the physiological signal acquisition device corresponding to the target device information in the multiple device information that is in an available state as the target physiological signal acquisition device.
[0090] For each physiological signal acquisition device, the electronic device can store the device information of that physiological signal acquisition device in a storage location corresponding to the connection method. Therefore, after startup, the electronic device can obtain the connection method and corresponding storage location for that physiological signal acquisition device, and retrieve the device information in that storage location. Thus, the electronic device can obtain device information for multiple physiological signal acquisition devices based on their connection methods.
[0091] Device information can be stored in the registry at a corresponding storage location, which can be referred to as the registry path.
[0092] Assuming that a physiological signal acquisition device is connected to an electronic device via USB, the device information of the physiological signal acquisition device can be stored in the registry path, and this registry path can be the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB subkey. The registry under this registry path stores the device information of the physiological signal acquisition device.
[0093] After the electronic device confirms that it is connected to the target physiological signal acquisition device, it can send a data acquisition command to the target physiological signal acquisition device. The target physiological signal acquisition device responds to the data acquisition command and acquires physiological signal data.
[0094] In some embodiments of this disclosure, since different data processing models in edge devices have different requirements for physiological signal data, these requirements may be in terms of data volume. If an electronic device directly transmits multiple initial data packets to the edge device, the amount of physiological signal data provided may not meet the actual requirements of the target data processing model, potentially introducing irrelevant or redundant physiological signal data. This could lead to lower processing efficiency of the target data processing model and consequently affect its performance. Therefore, embodiments of this disclosure also provide a method for transmitting physiological signal data. Figure 2Based on the illustrated embodiment, this paper describes a possible implementation of a sampling method for obtaining multiple initial data packets. This method can be applied to... Figure 1 Electronic devices in the transmission system shown, such as Figure 3 As shown, the method of this embodiment is as follows: S31: The electronic device determines the desired number of samples of physiological signal data to be sampled from any initial data packet.
[0095] The expected sampling number is the number of physiological signal data samples to be taken from the physiological signal data collected by a data acquisition channel expected by the target data processing model.
[0096] The expected number of samples can be represented by the number of samples per packet (samplePerPacket), which represents the number of physiological signal data contained in one data acquisition channel in the initial data packet that the target data processing model expects.
[0097] It is understandable that, since the original sampling frequency of the physiological signal data of the target physiological signal acquisition device represents the number of physiological signal data collected by each data acquisition channel of the physiological signal acquisition device per unit time, and the number of physiological signal data collected by each data acquisition channel of the target physiological signal acquisition device is the same; therefore, the electronic device can determine the number of physiological signal data to be sampled in each data acquisition channel within the initial data packet based on the expected number of physiological signal data samples from any initial data packet, and thus determine the total number of physiological signal data to be sampled within the initial data packet.
[0098] In some embodiments of this disclosure, the electronic device may determine the desired number of physiological signal data samples from any initial data packet in a manner that includes the steps B1-B4: B1: The original sampling frequency of the target physiological signal acquisition device for physiological signal data, and the original number of reference physiological signal data contained in the initial data packet.
[0099] Among them, the reference physiological signal data is the physiological signal data collected by one data acquisition channel of the target physiological signal acquisition device.
[0100] In some embodiments, the electronic device may store the original sampling frequency of the physiological signal data acquired by the target physiological signal acquisition device, and the original number of reference physiological signal data included in the initial data packet corresponding to the physiological signal data acquired by the target physiological signal acquisition device. For example, when the target physiological signal acquisition device is an EEG signal acquisition device, and the reference physiological signal data is EEG signal data acquired by one data acquisition channel of the EEG signal acquisition device, the original sampling frequency of the EEG signal data may be 2048Hz, and the original number of reference physiological signal data included in the initial data packet may be 16.
[0101] The original quantity can be represented by the original sample count, which represents the number of physiological signal data contained in one data acquisition channel in the initial data packet.
[0102] In other embodiments, the electronic device may also store the original sampling frequency of the physiological signal data acquired by the target physiological signal acquisition device, and the original transmission rate of the initial data packet corresponding to the physiological signal data acquired by the target physiological signal acquisition device. Then, the electronic device can obtain the original number of reference physiological signal data contained in the initial data packet based on the ratio of the original sampling frequency of the physiological signal data acquired by the target physiological signal acquisition device to the original transmission rate of the initial data packet. For example, when the target physiological signal acquisition device is an EEG signal acquisition device, and the reference physiological signal data is EEG signal data acquired by one data acquisition channel of the EEG signal acquisition device, the original sampling frequency of the EEG signal data can be 2048Hz, and the original transmission rate of the initial data packet corresponding to the EEG signal data can be 128 packets / second. Then, the electronic device can obtain that the original number of reference physiological signal data contained in the initial data packet is 16.
[0103] The original transmission rate can be represented by the original packet reporting frequency (originalPacketFreq), which represents the rate at which the target physiological signal acquisition device uploads the initial data packets.
[0104] B2: The expected reception frequency of physiological signal data by the target data processing model of the electronic device.
[0105] Since the electronic device can obtain the attribute information of each data processing model contained in the prediction application from the edge device, and the attribute information includes the expected frequency of the physiological signal data that the data processing model expects to receive, when there is only one target data processing model, after the electronic device determines a data processing model as the target data processing model, it can determine the expected frequency of the data processing model as the expected receiving frequency of the target data processing model for physiological signal data from the attribute information.
[0106] For example, if the expected frequency for the emotion recognition model to receive EMG signal data is 512Hz in the attribute information, and the electronic device identifies the emotion recognition model as the target data processing model, then the electronic device can determine 512Hz as the expected receiving frequency for the target data processing model to receive EMG signal data from the attribute information.
[0107] B3: The ratio of the desired receiving frequency to the original sampling frequency obtained by the electronic device.
[0108] Among them, the desired receiving frequency The ratio of the original sampling frequency originalFreq This can be expressed by the following formula:
[0109] Because the target data processing model meets the target conditions, the expected receiving frequency of the target data processing model for physiological signal data is less than or equal to the original sampling frequency of the target physiological signal acquisition device for physiological signal data. Therefore, the ratio of the expected receiving frequency to the original sampling frequency is less than or equal to 1.
[0110] For example, assuming the target data processing model is an emotion recognition model, if the expected receiving frequency of the emotion recognition model for EMG signal data is 512Hz and the original sampling frequency of the EEG signal data is 2048Hz, then the ratio of the expected receiving frequency to the original sampling frequency is 1 / 4.
[0111] B4: The electronic device determines the desired number of physiological signal data samples to be taken from any initial data packet based on the product of the ratio and the original number.
[0112] The desired number of samples, samplePerPacket, can be expressed by the following formula:
[0113] Where sampleRatio is the ratio of the desired receiving frequency to the original sampling frequency. This represents the original quantity.
[0114] For example, assuming the target data processing model is an emotion recognition model, if the initial data packet corresponding to the EEG signal data contains 16 original EEG physiological signal data points (a ratio of 1 / 4), then the emotion recognition model expects to sample 4 physiological signal data points from any initial EEG data packet. If the initial data packet corresponding to the EEG signal data contains 2 original EEG physiological signal data points (a ratio of 1 / 4), then the emotion recognition model expects to sample 1 / 2 physiological signal data points from any initial EEG data packet.
[0115] S32: The electronic device determines whether the expected number of samples is greater than the set threshold. If yes, it executes S33; otherwise, it executes S34.
[0116] The electronic device can pre-store a set threshold; for example, the set threshold can be 1.
[0117] Taking a threshold of 1 as an example, the electronic device determines whether the expected number of samples is greater than 1. If yes, the electronic device can execute step S33; if no, the electronic device can execute step S34.
[0118] S33: The electronic device determines the sampling method by sampling each initial data packet, and sampling each initial data packet at least twice.
[0119] For example, if the threshold is set to 1, if the expected number of samples is greater than 1, it indicates that the expected receiving frequency is high. Therefore, each initial data packet needs to be sampled to ensure that the amount of physiological signal data obtained from the sampling is large, thereby ensuring that the amount of physiological signal data transmitted to the target data processing model per unit time meets the expected receiving frequency.
[0120] S34: The electronic device determines the sampling method by sampling each initial data packet at most once.
[0121] For example, if the threshold is set to 1, if the expected number of samples is less than or equal to 1, it indicates that the expected receiving frequency is low. Therefore, each initial data packet needs to be sampled at most once to ensure that the amount of physiological signal data obtained from the sampling is small, thereby ensuring that the amount of physiological signal data transmitted to the target data processing model per unit time meets the expected receiving frequency.
[0122] Specifically, electronic devices can determine the expected number of physiological signal data samples from any initial data packet, and determine the sampling method for multiple initial data packets based on whether the expected number of samples is greater than a set threshold. This ensures that the amount of physiological signal data transmitted by the electronic device to the target data processing model per unit time meets the expected receiving frequency of the target data processing model, thereby ensuring the processing efficiency and performance of the target data processing model.
[0123] In some embodiments of this disclosure, when the desired number of samples exceeds a set threshold, due to the time-varying nature of physiological signal data, if the electronic device randomly samples at least one physiological signal data from the physiological signal data in each initial data packet, the sampled physiological signal data may be unevenly distributed over time, exhibiting randomness, and potentially leading to low representativeness and completeness. Therefore, embodiments of this disclosure also provide a method for transmitting physiological signal data. Figure 3 Based on the illustrated embodiment, a possible implementation of S33 is further described, which can be applied to... Figure 1 Electronic devices in the transmission system shown, such as Figure 4 As shown, the method of this embodiment is as follows: S331: The electronic device acquires the raw amount of reference physiological signal data contained in the initial data packet.
[0124] Among them, the reference physiological signal data is the physiological signal data collected by one data acquisition channel of the target physiological signal acquisition device.
[0125] The electronic device can store the original number of reference physiological signal data contained in the initial data packet corresponding to the target physiological signal acquisition device. For example, when the target physiological signal acquisition device is an EEG signal acquisition device, and the reference physiological signal data is EEG signal data acquired by one data acquisition channel of the EEG signal acquisition device, the original number of reference physiological signal data contained in the initial data packet corresponding to the EEG signal acquisition device can be 16.
[0126] S332: The electronic device obtains a first sample quantity based on the ratio of the original quantity to the desired sample quantity.
[0127] Here, the first sampling number is the sampling period of physiological signal data in the initial data packet, representing that the electronic device samples one physiological signal data for every first sampling number of physiological signal data in each initial data packet. The electronic device can determine the first sampling number as the ratio of the original number to the expected sampling number. For example, assuming that the original number of reference physiological signal data in the initial data packet is 16, and the target data processing model expects to sample 4 physiological signal data from any initial data packet, then the first sampling number is 4.
[0128] S333: In any initial data packet, the electronic device performs one physiological signal data sampling according to the first sampling quantity.
[0129] Assuming that the initial data packet contains 16 reference physiological signal data points and the first sampling number is 4, the electronic device can sample each initial data packet and sample the physiological signal data in the initial data packet once for every 4 physiological signal data points. That is, the electronic device can sample 4 physiological signal data points from the reference physiological signal data points contained in each initial data packet.
[0130] In some embodiments, the electronic device may set a first characterization parameter, such as sample resampling, and a second characterization parameter, such as packet resampling. The first characterization parameter characterizes how many physiological signal data points the electronic device samples for each physiological signal data point within each initial packet, and the second characterization parameter characterizes how many initial packets contain one initial packet for sampling.
[0131] Since each initial data packet participates in sampling when the expected number of samples is greater than the set threshold, that is, one initial data packet participates in sampling in each initial data packet, and the electronic device samples one physiological signal data for every first number of physiological signal data, the electronic device can assign the first number of samples to the first characterization parameter and assign the second characterization parameter to 1.
[0132] Taking SampleResample as the first characterization parameter and PacketResample as the second characterization parameter, with PacketResample=1, SampleResample can be represented by the following formula:
[0133] in, For the original quantity, This represents the desired number of samples.
[0134] Based on the previous example, assuming that the initial data packet contains 16 original reference physiological signal data, and the target data processing model expects to sample 4 physiological signal data from any initial data packet, then SampleResample = 4, PacketResample = 1.
[0135] Specifically, when the expected number of samples exceeds a set threshold, the electronic device can sample one physiological signal data for each initial data packet for every first sampling number, ensuring that the amount of sampled physiological signal data meets the actual needs of the target data processing model, and at the same time ensuring that the sampled physiological signal data is evenly distributed over time, thereby improving the representativeness and completeness of the acquired physiological signal data.
[0136] In some embodiments of this disclosure, when the desired sampling number is less than or equal to a set threshold, if the desired sampling number is equal to the set threshold, the electronic device can sample one physiological signal data for each initial data packet; if the desired sampling number is less than the set threshold, the electronic device will not sample each initial data packet. Since physiological signal data is time-varying, and initial data packets are also time-varying, if the electronic device randomly selects initial data packets from multiple initial data packets for sampling, the sampled physiological signal data may be unevenly distributed over time, exhibiting randomness, and potentially leading to low representativeness and completeness. Therefore, embodiments of this disclosure also provide a method for transmitting physiological signal data. Figure 3 Based on the illustrated embodiment, a possible implementation of S34 is further described, which can be applied to... Figure 1 Electronic devices in the transmission system shown, such as Figure 5 As shown, the method of this embodiment is as follows: S341: The electronic device acquires the original transmission rate of the target physiological signal acquisition device for the initial data packet, and the target data processing model's expected reception rate for the initial data packet.
[0137] The electronic device can store the raw transmission rate of the physiological signal data from the target physiological signal acquisition device. For example, the raw transmission rate can be 128 packets / second.
[0138] In some implementations, the electronic device can determine the expected reception rate of the target data processing model for the initial data packets by multiplying the ratio of the desired reception frequency to the original sampling frequency by the original transmission rate. For example, if the original sampling frequency is 2048 Hz, the desired reception frequency is 512 Hz, and the original transmission rate is 128 packets / second, then the desired reception rate is 32 packets / second.
[0139] The desired reception rate can be represented by the number of packets required per second (reqiredPacketPerSecond), which represents the number of initial packets that the target data processing model expects to receive per second.
[0140] In other implementations, the attribute information may also include the target data processing model's expected reception rate for the initial data packets. Therefore, the electronic device can obtain the expected reception rate from the attribute information.
[0141] S342: The electronic device obtains a second quantity based on the ratio of the original transmission rate to the desired reception rate.
[0142] The second quantity refers to the sampling period of the initial data packets, indicating that one initial data packet participates in the sampling out of every second quantity of initial data packets received by the electronic device. The electronic device can determine the second quantity as the ratio of the original transmission rate to the expected reception rate. For example, assuming the original transmission rate of the target physiological signal acquisition device for the initial data packets is 128 packets / second and the expected reception rate of the target data processing model for the initial data packets is 32 packets / second, then the second quantity is 4.
[0143] S343: The electronic device performs physiological signal data sampling once for every second number of initial data packets in a plurality of initial data packets.
[0144] Assuming the total number of initial data packets is 128 and the second number is 4, the electronic device can sample one physiological signal data from every four initial data packets. That is, the electronic device samples a total of 32 physiological signal data.
[0145] Because when the expected number of samples is less than or equal to the set threshold, the electronic device samples the data packets involved in the sampling only once. That is, within an initial data packet, the electronic device samples one physiological signal data for every original number of physiological signal data, and in every second number of initial data packets, one initial data packet participates in the sampling. Therefore, the electronic device can assign the value of the original number to the first characterization parameter and assign the second number to the second characterization parameter.
[0146] Taking SampleResample as the first characterization parameter and PacketResample as the second characterization parameter as an example, SampleResample can be represented by the following formula:
[0147] in, This represents the original quantity.
[0148] PacketResample can be expressed by the following formula:
[0149] Where originalPacketFreq is the original transmission rate and reqiredPacketPerSecond is the desired reception rate.
[0150] For example, assuming the initial data packet contains 16 original reference physiological signal data, the target physiological signal acquisition device has an original transmission rate of 128 packets / second for the initial data packet, and the target data processing model has an expected reception rate of 32 packets / second for the initial data packet, then SampleResample = 16 and PacketResample = 4.
[0151] Specifically, when the expected number of samples is less than or equal to a set threshold, the electronic device can sample physiological signal data once for every second number of initial data packets in the multiple initial data packets. This ensures that the amount of sampled physiological signal data meets the actual needs of the target data processing model, and at the same time ensures that the sampled physiological signal data is evenly distributed over time, thereby improving the representativeness and completeness of the acquired physiological signal data.
[0152] In some embodiments of this disclosure, there are multiple target data processing models. Since each target data processing model may expect to receive physiological signal data at different frequencies, if multiple target data processing models expect to receive physiological signal data at different frequencies, the electronic device needs to sample the physiological signal data multiple times, resulting in low transmission efficiency of the physiological signal data. Furthermore, if the actual frequency at which the target data processing model receives physiological signal data is less than the expected frequency, the target data processing model's performance will degrade due to insufficient input information. Therefore, embodiments of this disclosure also provide a method for transmitting physiological signal data. Figure 3 Based on the illustrated embodiment, a possible implementation method for determining the desired reception frequency of physiological signal data for an electronic device when there are multiple target data processing models is further described. This method can be applied to... Figure 1 Electronic devices in the transmission system shown, such as Figure 6 As shown, the method of this embodiment is as follows: S61: Electronic devices acquire multiple desired frequencies.
[0153] Here, any desired frequency is the frequency at which the corresponding target data processing model expects to receive physiological signal data. Electronic devices can obtain the desired frequencies of multiple target data processing models from the attribute information of each target data processing model.
[0154] For example, suppose the target data processing model includes an emotion recognition model and an eye-tracking auto-mapping model. The emotion recognition model expects to receive EEG signal data at a frequency of 512Hz, and the eye-tracking auto-mapping model expects to receive EEG signal data at a frequency of 128Hz.
[0155] S62: The electronic device determines the expected reception frequency of physiological signal data for multiple target data processing models based on the maximum value of multiple expected frequencies.
[0156] Specifically, the electronic device can determine the maximum value of multiple desired frequencies as the desired reception frequency of physiological signal data for multiple target data processing models. When multiple target data processing models of the edge device are running simultaneously, and each target data processing model has a different desired frequency, the electronic device can sample the physiological signal data so that the amount of physiological signal data transmitted to multiple target data processing models per unit time matches the maximum value of multiple desired frequencies.
[0157] Based on the aforementioned example, the maximum expected frequency between the frequency at which the emotion recognition model expects to receive EEG signal data and the frequency at which the eye-tracking auto-mapping model actually receives EEG signal data is 512Hz. Therefore, the target data processing model expects to receive physiological signal data at a frequency of 512Hz.
[0158] Specifically, the electronic device acquires multiple desired frequencies and determines a desired receiving frequency based on these frequencies, thus avoiding repeated sampling of physiological signal data and improving the transmission efficiency of physiological signal data. In addition, the electronic device uses the maximum value among the multiple desired frequencies as the desired receiving frequency, preventing the target data processing model from receiving physiological signal data with frequencies lower than the desired frequency, thereby ensuring the performance of the target data processing model.
[0159] In some embodiments of this disclosure, the target physiological signal acquisition device also records the acquisition time of the physiological signal data, i.e., a timestamp, during the acquisition process. If the electronic device directly transmits the target physiological signal data to the edge device after sampling multiple initial data packets without buffering and packaging, network issues may cause misalignment between the physiological signal data and the timestamp, resulting in low integrity of the physiological signal data. Therefore, embodiments of this disclosure also provide a method for transmitting physiological signal data. Figure 2 Based on the illustrated embodiment, a possible implementation of S25 is further described, which can be applied to... Figure 1 Electronic devices in the transmission system shown, such as Figure 7 As shown, the method of this embodiment is as follows: S251: The electronic device obtains the desired buffer size and allocates the target buffer based on the desired buffer size, which is the buffer size expected by the target data processing model.
[0160] The electronic device can obtain the expected buffer size based on the expected data packet size of the data packet obtained after sampling by the target data processing model, and the expected number of data packets in the buffer expected by the target data processing model.
[0161] S252: The electronic device writes the target physiological signal data into the target buffer and acquires multiple target data packets.
[0162] The target data packet is a data packet obtained by packaging the target physiological signal data in the target buffer after the target buffer is full.
[0163] It is understandable that the target data packet size is the expected buffer size. For example, suppose the emotion recognition model expects to receive EEG signal data and the expected buffer size is 1KB, then the target data packet size corresponding to the EEG signal data is 1KB.
[0164] S253: The electronic device transmits multiple target data packets to the edge device so that the target data processing model can process the target physiological signal data.
[0165] In this device, the electronic device can transmit multiple target data packets to a prediction application in the edge device in a packaged order. The prediction application can then assign the multiple target data packets to a target data processing model within the prediction application, so that the target data processing model can process the target physiological signal data.
[0166] Specifically, the electronic device allocates the target buffer and packages the target data packet based on the expected buffer size. This ensures that the physiological signal data and timestamps in the target data packet are aligned, thereby improving the integrity of the physiological signal data.
[0167] In some embodiments, a single buffer may cause mutual exclusion and blocking problems during write and read operations. Therefore, the electronic device may also allocate two target buffers of the same size based on the desired buffer size. When one target buffer is in the write state, the other target buffer is in the pending or transmission state. When the target buffer in the write state is full, the electronic device packages the target physiological signal data in the target buffer into a target data packet and switches the write pointer to the other target buffer.
[0168] Thus, the electronic device achieves parallel execution of writing target physiological signal data and transmitting physiological signal data, avoiding data loss and improving the real-time performance of data transmission.
[0169] In some embodiments of this disclosure, if the electronic device allocates a fixed buffer size and the buffer is too small, the large amount of target data may lead to high communication overhead; if the electronic device allocates a fixed buffer size and the buffer is too large, the transmission of target data packets may be delayed, resulting in low transmission efficiency and consequently low transmission reliability. Therefore, embodiments of this disclosure also provide a method for transmitting physiological signal data. Figure 7 Based on the illustrated embodiment, a possible implementation of obtaining the desired buffer size in S251 is further described. This method can be applied to... Figure 1 Electronic devices in the transmission system shown, such as Figure 8 As shown, the method of this embodiment is as follows: S81: The electronic device acquires the expected data packet size, which is the size of the data packet obtained after sampling by the target data processing model.
[0170] Since the target physiological signal acquisition device also records the acquisition time (timestamp) of the physiological signal data during the acquisition process, the target data processing model expects the data packet obtained after sampling to also include the timestamps of the physiological signal data. Therefore, the size of the data packet obtained after sampling, as expected by the target data processing model, can be determined by the sum of the sizes of all physiological signal data to be sampled in the initial data packet and the size of the timestamps corresponding to all physiological signals.
[0171] In some embodiments of this disclosure, the electronic device may obtain the desired data packet size by including the following steps C1 to C3: Step C1: The electronic device acquires the expected data size, which is the sum of the sizes of all physiological signal data contained in the data packet obtained after sampling by the target data processing model.
[0172] The number of physiological signal data from each data acquisition channel in the data packet obtained after sampling, which is expected to be included in the data packet obtained after sampling by the target data processing model, is the expected number of physiological signal data samples from any initial data packet. The number of data acquisition channels in the data packet obtained after sampling, which is expected to be included in the data packet, is the expected number of data acquisition channels of the target data processing model. Therefore, the electronic device can obtain the expected data size based on the expected number of channels and the expected number of samples.
[0173] Furthermore, when there are multiple target data processing models, since the expected reception frequency of physiological signal data is the same for multiple target data processing models, the target physiological signal acquisition devices corresponding to multiple target data processing models are the same. Therefore, the sum of the sizes of all physiological signal data contained in the data packets expected to be obtained after sampling by multiple target data processing models is the same.
[0174] In some embodiments of this disclosure, the electronic device may acquire the desired data size by including the following steps C11 and C12: Step C11: Obtain the desired number of channels, which is the number of data acquisition channels expected by the target data processing model.
[0175] Since the attribute information of the data processing model includes the acquisition channel information of the physiological signal acquisition device expected by the data processing model, and the acquisition channel information can include the expected channel type and the expected number of data acquisition channels, when there is only one target data processing model, the electronic device can directly obtain the expected number of channels from the acquisition channel information of the physiological signal acquisition device expected by the target data processing model.
[0176] When there are multiple target data processing models, the electronic device can obtain the desired number of channels based on the union of the types of data acquisition channels expected by these target data processing models. For example, suppose the target data processing models include an emotion recognition model and an eye-tracking auto-mapping model. The emotion recognition model expects the data acquisition channels of the EEG signal acquisition device to include left frontal lobe channels and left parietal lobe channels. The eye-tracking auto-mapping model expects the data acquisition channels of the EEG signal acquisition device to include left parietal lobe channels and right parietal lobe channels. The union of the types of data acquisition channels expected by the emotion recognition model and the eye-tracking auto-mapping model includes three channels: left frontal lobe channel, left parietal lobe channel, and right parietal lobe channel. Then the desired number of channels is 3.
[0177] Step C12: The electronic device obtains the expected data size based on the product of the expected number of samples, the expected number of channels, and the size of the physiological signal data from any initial data packet.
[0178] Since each physiological signal data occupies the same amount of memory, the size of each physiological signal data is the same. The electronic device can determine the total number of physiological signal data contained in the data packet obtained after sampling by the target data processing model by multiplying the expected number of physiological signal data to be sampled from an initial data packet by the expected number of channels. The electronic device can also determine the expected data size by multiplying the total number of physiological signal data contained in the data packet obtained after sampling by the target data processing model by the size of the physiological signal data. For example, assuming the expected number of samples is 4 and the expected number of channels is 4, if the data type of the physiological signal data is single-precision floating-point (Float), then one physiological signal data occupies 4 bytes, so the expected data size is 64 bytes.
[0179] Step C2: Obtain the expected timestamp size, which is the sum of the sizes of all timestamps contained in the data packet obtained after sampling by the target data processing model.
[0180] The electronic device can pre-store the sum of the sizes of all timestamps in the data packet that the target data processing model expects to be obtained after sampling. For example, the expected timestamp size can be 8 bytes.
[0181] In some embodiments, since the physiological signal acquisition device for acquiring physiological signal data is established on a uniform, monotonically increasing time axis, the timestamp of any physiological signal data can be represented as a point on the uniform time axis. Therefore, the electronic device can use a double-precision floating-point number (Double) type to store all the timestamps contained in the data packet that the target data processing model expects to obtain after sampling.
[0182] Step C3: The electronic device obtains the expected data packet size based on the sum of the expected data size and the expected timestamp size.
[0183] The electronic device can determine the expected data packet size by summing the expected data size and the expected timestamp size. Based on the previous example, assuming the expected data size is 64 bytes and the expected timestamp size is 8 bytes, the expected data packet size is 72 bytes.
[0184] S82: The electronic device acquires the expected number of data packets, which is the number of data packets in the buffer expected by the target data processing model.
[0185] The electronic device can determine the desired number of data packets based on the original transmission rate of the initial data packets. In other words, the electronic device can use the number of initial data packets transmitted per unit time as the desired number of data packets. For example, assuming the original transmission rate of the initial data packets is 128 packets / second, the desired number of data packets could be 128.
[0186] In some embodiments, the electronic device may obtain the desired number of data packets by multiplying a preset push frequency by the original transmission rate of the initial data packets; wherein the push frequency is less than 1.
[0187] The electronic device can determine the desired number of data packets by multiplying the preset push frequency by the original transmission rate of the initial data packet. This can limit the number of data packets in the target buffer to a reasonable range, thereby reducing the amount of physiological signal data in the target buffer and reducing transmission loss.
[0188] Electronic devices can pre-store push frequencies. For example, if the push frequency is 1 / 32 of a second and the initial data packet transmission rate is 128 packets per second, then the expected number of data packets can be 4.
[0189] S83: The electronic device obtains the expected buffer size based on the product of the expected data packet size and the expected number of data packets.
[0190] The electronic device can determine the expected buffer size by multiplying the expected data packet size by the expected number of data packets. Based on the previous example, assuming the expected data packet size is 72 bytes and the expected number of data packets is 4, the expected buffer size is 288 bytes.
[0191] Specifically, electronic devices can dynamically adjust the size of the target buffer corresponding to the physiological signal data based on the quantity requirements of the target data processing model, so that the size of the target data packet can make reasonable use of transmission resources, thereby ensuring the reliable transmission of the target data packet.
[0192] Figure 9 This is a block diagram of a physiological signal data transmission device provided in this disclosure, such as... Figure 9 As shown, the device includes: The first acquisition module 901 is used to determine the target data processing model corresponding to the target physiological signal acquisition device from multiple data processing models of the edge device. The target data processing model refers to the data processing model that is expected to process the physiological signal data acquired by the target physiological signal acquisition device. The target physiological signal acquisition device is at least one of multiple physiological signal acquisition devices installed in the electronic device. The second acquisition module 902 is used to acquire multiple initial data packets, wherein the initial data packets include: physiological signal data acquired by the target physiological signal acquisition device; The processing module 903 is used to acquire the sampling method of multiple initial data packets, and to sample the multiple initial data packets based on the sampling method to obtain target physiological signal data; The transmission module 904 is used to transmit the target physiological signal data to the edge device so that the target data processing model can process the target physiological signal data.
[0193] In some embodiments, the processing module 903 is configured to determine the expected number of samples for physiological signal data sampling from any initial data packet; if the expected number of samples is greater than a set threshold, the sampling method is determined by sampling each initial data packet at least twice; if the expected number of samples is less than or equal to the set threshold, the sampling method is determined by sampling each initial data packet at most once.
[0194] In some embodiments, the processing module 903 is further configured to obtain the original number of reference physiological signal data contained in the initial data packet, wherein the reference physiological signal data is physiological signal data collected by a data acquisition channel of the target physiological signal acquisition device; obtain a first sampling number based on the ratio of the original number to the expected sampling number; and perform one physiological signal data sampling in any initial data packet according to the first sampling number.
[0195] In some embodiments, the processing module 903 is further configured to obtain the original transmission rate of the target physiological signal acquisition device to the initial data packet and the expected reception rate of the target data processing model to the initial data packet; obtain a second quantity based on the ratio of the original transmission rate to the expected reception rate; and perform physiological signal data sampling once for every second quantity of initial data packets in the plurality of initial data packets.
[0196] In some embodiments, the processing module 903 is configured to obtain the original sampling frequency of the physiological signal data from the target physiological signal acquisition device, and the original quantity of reference physiological signal data contained in the initial data packet, wherein the reference physiological signal data is the physiological signal data acquired by a data acquisition channel of the target physiological signal acquisition device; obtain the expected receiving frequency of the physiological signal data from the target data processing model; obtain the ratio of the expected receiving frequency to the original sampling frequency; and determine the expected sampling quantity of physiological signal data to be sampled from any initial data packet based on the product of the ratio and the original quantity.
[0197] In some embodiments, there are multiple target data processing models; the processing module 903 is used to acquire multiple expected frequencies, wherein any one expected frequency is the frequency at which the corresponding target data processing model expects to receive physiological signal data; and based on the maximum value of the multiple expected frequencies, the expected receiving frequency of the multiple target data processing models for physiological signal data is determined.
[0198] In some embodiments, the transmission module 904 is configured to obtain the desired buffer size and allocate a target buffer based on the desired buffer size, wherein the desired buffer size is the buffer size expected by the target data processing model; write the target physiological signal data into the target buffer and obtain multiple target data packets, wherein the target data packets are data packets obtained by packaging the target physiological signal data in the target buffer after the target buffer is full; and transmit the multiple target data packets to the edge device so that the target data processing model can process the target physiological signal data.
[0199] In some embodiments, the transmission module 904 is configured to obtain the expected data packet size, which is the size of the data packet obtained after sampling as desired by the target data processing model; obtain the expected number of data packets, which is the number of data packets in the buffer as desired by the target data processing model; and obtain the expected buffer size based on the product of the expected data packet size and the expected number of data packets.
[0200] In some embodiments, the data packet obtained after sampling includes at least one physiological signal data and a timestamp for each physiological signal data; the transmission module 904 is configured to obtain the expected data size, which is the sum of the sizes of all physiological signal data included in the data packet obtained after sampling as expected by the target data processing model; obtain the expected timestamp size, which is the sum of the sizes of all timestamps included in the data packet obtained after sampling as expected by the target data processing model; and obtain the expected data packet size based on the sum of the expected data size and the expected timestamp size.
[0201] In some embodiments, the transmission module 904 is used to obtain the desired number of channels, which is the number of data acquisition channels expected by the target data processing model; and to obtain the desired data size based on the product of the desired number of samples, the desired number of channels, and the size of the physiological signal data sampled from any initial data packet.
[0202] In some embodiments, the transmission module 904 is used to obtain the desired number of data packets based on the product of a preset push frequency and the original transmission rate of the initial data packet; wherein the push frequency is less than 1.
[0203] In some embodiments, the multiple data processing models include at least one of an emotion recognition model, a fatigue detection model, and an automatic eye-tracking mapping model; the first acquisition module 901 is used to determine the target signal acquisition device corresponding to the physiological signal data required for data processing by any data processing model in the edge device, wherein the target physiological signal acquisition device includes one of an electroencephalogram (EEG) signal acquisition device, an electrocardiogram (ECG) signal acquisition device, an electromyogram (EMG) signal acquisition device, and an eye-tracking signal acquisition device; the second acquisition module 902 is used to acquire multiple initial data packets generated by any target physiological signal acquisition device based on the acquired physiological signal data; the processing module 903 is used to acquire the sampling method of the initial data packets, and sample the physiological signal data in any initial data packet based on the sampling method to obtain the target physiological signal data corresponding to any initial data packet; the transmission module 904 is used to transmit the target physiological signal data to the target data processing model based on the correspondence between the target physiological signal acquisition device and the target data processing model, so that the target data processing model processes the corresponding target physiological signal data.
[0204] The apparatus in this embodiment can be used to execute the physiological signal data transmission method of the above embodiment. Its implementation principle and technical effect are similar, and will not be described again here.
[0205] Figure 10 This is a schematic diagram of the structure of an electronic device provided in this disclosure, such as... Figure 10 As shown, the electronic device 10 includes a memory 1001, a processor 1002, and a computer program stored in the memory 1001 and executable on the processor 1002. When the processor 1002 executes the computer program, it implements the method for transmitting physiological signal data as described in the above embodiment.
[0206] This disclosure also provides a computer-readable storage medium on which a program is stored, and when the program is executed by a processor, it implements the method for transmitting physiological signal data as described in the above embodiments.
[0207] The embodiments of this disclosure have now been described in detail. To avoid obscuring the concept of this disclosure, some details known in the art have not been described. Those skilled in the art can fully understand how to implement the technical solutions disclosed herein based on the above description.
[0208] While specific embodiments of this disclosure have been described in detail by way of examples, those skilled in the art should understand that the examples are for illustrative purposes only and not intended to limit the scope of this disclosure. Those skilled in the art should understand that modifications can be made to the above embodiments or equivalent substitutions can be made to some technical features without departing from the scope and spirit of this disclosure. In particular, as long as there is no structural conflict, the technical features mentioned in the various embodiments can be combined in any manner.
Claims
1. A method for transmitting physiological signal data, characterized in that, Applied to electronic devices, the method includes: From multiple data processing models of edge devices, a target data processing model corresponding to the target physiological signal acquisition device is determined. The target data processing model refers to the data processing model that is expected to process the physiological signal data acquired by the target physiological signal acquisition device. The target physiological signal acquisition device is one of multiple physiological signal acquisition devices connected to the electronic device. Acquire multiple initial data packets, wherein the initial data packets include: physiological signal data acquired by the target physiological signal acquisition device; The sampling method for the initial data packet is obtained, and multiple initial data packets are sampled based on the sampling method to obtain target physiological signal data; The target physiological signal data is transmitted to the edge device so that the target data processing model processes the target physiological signal data.
2. The method according to claim 1, characterized in that, The method for obtaining the sampling of the multiple initial data packets includes: Determine the desired number of physiological signal data samples to be taken from any of the initial data packets; If the expected number of samples is greater than a set threshold, then the sampling method is determined to include: sampling each initial data packet, and sampling each initial data packet at least twice; If the expected number of samples is less than or equal to the set threshold, then the sampling method is determined to include: sampling each initial data packet at most once.
3. The method according to claim 2, characterized in that, The method further includes: Obtain the original number of reference physiological signal data contained in the initial data packet, wherein the reference physiological signal data is physiological signal data collected by a data acquisition channel of the target physiological signal acquisition device; The first sampling quantity is obtained based on the ratio of the original quantity to the expected sampling quantity; The step of sampling each initial data packet, and sampling each initial data packet at least twice, includes: In any of the initial data packets, physiological signal data is sampled once according to the first sampling quantity.
4. The method according to claim 2, characterized in that, The method further includes: The original transmission rate of the target physiological signal acquisition device to the initial data packet and the expected reception rate of the target data processing model to the initial data packet are obtained. A second quantity is obtained based on the ratio of the original transmission rate to the desired reception rate; The step of sampling each initial data packet at most once includes: For each of the second number of initial data packets in the plurality of initial data packets, physiological signal data is sampled once.
5. The method according to any one of claims 2 to 4, characterized in that, Determining the desired number of physiological signal data samples from any of the initial data packets includes: The original sampling frequency of the physiological signal data by the target physiological signal acquisition device and the original number of reference physiological signal data contained in the initial data packet are obtained, wherein the reference physiological signal data are physiological signal data acquired by one data acquisition channel of the target physiological signal acquisition device. Obtain the target data processing model's expected reception frequency for the physiological signal data; Obtain the ratio of the desired receiving frequency to the original sampling frequency; The desired number of samples is determined based on the product of the ratio and the original number.
6. The method according to claim 5, characterized in that, The target data processing model is multiple; obtaining the expected reception frequency of the physiological signal data by the target data processing model includes: Multiple desired frequencies are obtained, wherein any one of the desired frequencies is the frequency at which the corresponding target data processing model expects to receive physiological signal data; The desired receiving frequency is determined based on the maximum value of multiple desired frequencies.
7. The method according to any one of claims 1 to 4, characterized in that, Transmitting multiple target physiological signal data to the target data processing model in the edge device, including: Obtain the desired buffer size, and allocate a target buffer based on the desired buffer size, wherein the desired buffer size is the buffer size expected by the target data processing model; Multiple target physiological signal data are written into the target buffer, and multiple target data packets are obtained, wherein the target data packets are data packets obtained by packaging the target physiological signal data in the target buffer after the target buffer is full; Multiple target data packets are transmitted to the edge device so that the target data processing model processes multiple target physiological signal data.
8. The method according to claim 7, characterized in that, The process of obtaining the desired buffer size includes: Obtain the expected data packet size, which is the size of the data packet that the target data processing model expects to obtain after sampling; Obtain the expected number of data packets, which is the number of data packets in the buffer expected by the target data processing model; The expected buffer size is obtained based on the product of the expected data packet size and the expected number of data packets.
9. The method according to claim 8, characterized in that, The data packet obtained after sampling includes at least one physiological signal data and a timestamp for each physiological signal data; obtaining the expected data packet size includes: Obtain the expected data size, which is the sum of the sizes of all physiological signal data contained in the data packet obtained after sampling by the target data processing model; Obtain the expected timestamp size, which is the sum of the sizes of all timestamps contained in the data packet obtained after sampling by the target data processing model; The expected data packet size is obtained based on the sum of the expected data size and the expected timestamp size.
10. The method according to claim 9, characterized in that, The process of obtaining the desired data size includes: Obtain the desired number of channels, where the desired number of channels is the number of data acquisition channels expected by the target data processing model; The expected data size is obtained by multiplying the expected number of samples, the expected number of channels, and the size of the physiological signal data from any of the initial data packets.
11. The method according to claim 8, characterized in that, The process of obtaining the expected number of data packets includes: The desired number of data packets is obtained by multiplying the preset push frequency by the original transmission rate of the initial data packet; wherein the push frequency is less than 1.
12. The method according to claim 1, characterized in that, The multiple data processing models include at least one of an emotion recognition model, a fatigue detection model, and an automatic eye-tracking mapping model; the method specifically includes: When any of the data processing models in the edge devices performs data processing, the target signal acquisition device corresponding to the required physiological signal data is determined, wherein the target physiological signal acquisition device includes one of an electroencephalogram (EEG) signal acquisition device, an electrocardiogram (ECG) signal acquisition device, an electromyogram (EMG) signal acquisition device, and an eye movement signal acquisition device; Acquire multiple initial data packets generated by any of the target physiological signal acquisition devices based on the acquired physiological signal data; The sampling method of the initial data packet is obtained, and the physiological signal data in any initial data packet is sampled based on the sampling method to obtain the target physiological signal data corresponding to any initial data packet; Based on the correspondence between the target physiological signal acquisition device and the target data processing model, the target physiological signal data is transmitted to the target data processing model so that the target data processing model processes the corresponding target physiological signal data.
13. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a program that can run on the processor, the program being executed by the processor to implement the method for transmitting physiological signal data as described in any one of claims 1 to 12.
14. A physiological signal data transmission system, characterized in that, The transmission system includes an edge device, at least one physiological signal acquisition device, and an electronic device as described in claim 13, wherein each of the physiological signal acquisition devices is connected to the electronic device, and the electronic device is connected to the edge device.
15. A computer-readable storage medium, characterized in that, A program is stored on the computer-readable storage medium, which, when executed by a processor, implements the method as described in any one of claims 1 to 12.