Test method, device and equipment of BCG algorithm, medium and computer program product
By generating pseudo BCG signals to replace the real collected BCG signal samples, the problem of high BCG algorithm testing cost is solved, and the time and labor costs are reduced.
Patent Information
- Application Number
- CN202510840849.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2025-09-23
AI Technical Summary
In the prior art, testing the BCG algorithm requires collecting a large number of ECG signal and BCG signal samples, resulting in high time and labor costs.
By acquiring the electrocardiogram (ECG) signal, the pre-trained ballistocardiogram (BCG) signal generation model is input to generate a pseudo BCG signal, and the BCG algorithm is tested based on the pseudo BCG signal and the ECG signal.
The cost of BCG algorithm testing is effectively reduced by generating pseudo BCG signals to replace the real collected BCG signal samples, thus reducing data collection time and manpower consumption.
Smart Images

Figure CN120687364A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of BCG algorithm testing, and in particular to a BCG algorithm testing method, apparatus, equipment, medium and computer program product. Background Art
[0002] Currently, electrocardiogram (ECG) signals are used as the gold standard for measuring heart rate in medicine. The accuracy of the BCG algorithm is tested by comparing the number of heart rate beats in the ballistocardiogram (BCG) signal with that in the ECG signal.
[0003] However, testing the BCG signal algorithm requires collecting a large number of ECG and BCG signal sample pairs. In practice, collecting ECG and BCG signal samples is time-consuming and labor-intensive, increasing testing costs.
[0004] Therefore, how to reduce the testing cost of the BCG algorithm is a technical problem that needs to be solved urgently. Summary of the Invention
[0005] The present invention provides a BCG algorithm testing method, apparatus, equipment, medium and computer program product to effectively reduce testing costs and provide assistance for the optimization of the BCG algorithm.
[0006] According to one aspect of the present invention, a method for testing a BCG algorithm is provided, comprising:
[0007] Obtain electrocardiogram (ECG) signals;
[0008] The ECG signal is input into a pre-trained ballistocardiogram (BCG) signal generation model to obtain a pseudo BCG signal output by the BCG signal generation model;
[0009] The BCG algorithm was tested based on pseudo BCG signals and ECG signals.
[0010] In some implementations, before acquiring an electrocardiogram (ECG) signal, the method further includes:
[0011] Acquire a sample ECG signal and a sample BCG signal corresponding to the sample ECG signal;
[0012] Based on the sample ECG signal and the sample BCG signal, an initial signal generation model is trained to obtain a BCG signal generation model.
[0013] In some implementations, training the initial signal generation model based on the sample ECG signal and the sample BCG signal to obtain the BCG signal generation model includes:
[0014] The sample ECG signal is input into the initial signal generation model, and the initial signal generation model generates a BCG signal to be used;
[0015] Calculate the loss value based on the BCG signal to be used and the sample BCG signal, and adjust the network parameters of the initial signal generation model according to the loss value;
[0016] The process of generating the BCG signal to be used, calculating the loss value, and adjusting the network parameters is repeated until the preset iteration stop condition is met, and the current initial signal generation model is determined as the BCG signal generation model.
[0017] In some implementations, the preset iteration stopping condition is: the number of training rounds of the initial signal generation model is greater than the preset training rounds or the accuracy of the initial signal generation model is greater than the preset accuracy.
[0018] In some implementations, testing a BCG algorithm based on a pseudo BCG signal and an ECG signal includes:
[0019] Based on the pseudo BCG signal and the BCG algorithm, a first heart rate beat number corresponding to the pseudo BCG signal is calculated;
[0020] A second heart rate beat number is determined based on the ECG signal, and an accuracy of the BCG algorithm test is determined based on the first heart rate beat number and the second heart rate beat number.
[0021] According to another aspect of the present invention, a testing device for a BCG algorithm is provided, comprising:
[0022] A signal acquisition module is used to acquire electrocardiogram (ECG) signals;
[0023] A signal generation module is used to input ECG signal data into a pre-trained ballistocardiogram (BCG) signal generation model to obtain pseudo BCG signal data output by the BCG signal generation model;
[0024] The algorithm testing module is used to test the BCG algorithm based on pseudo BCG signal data and ECG signal data.
[0025] In some implementations, the method further includes:
[0026] The model training module is used to obtain sample ECG signal data and sample BCG signal data corresponding to the sample ECG signal data; based on the sample ECG signal data and the sample BCG signal data, the initial signal generation model is trained to obtain a BCG signal generation model.
[0027] According to another aspect of the present invention, an electronic device is provided, comprising:
[0028] at least one processor;
[0029] and a memory communicatively connected to the at least one processor; wherein,
[0030] The memory stores a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform the BCG algorithm testing method described in any embodiment of the present invention.
[0031] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the BCG algorithm testing method described in any embodiment of the present invention when executed.
[0032] According to another aspect of the present invention, a computer program product is provided. The computer program product includes a computer program. When executed by a microprocessor, the computer program implements the testing method of the BCG algorithm described in any embodiment of the present invention.
[0033] The technical solution of an embodiment of the present invention includes acquiring an electrocardiogram (ECG) signal; inputting the ECG signal into a pre-trained ballistocardiogram (BCG) signal generation model to obtain a pseudo-BCG signal output by the BCG signal generation model; and testing a BCG algorithm based on the pseudo-BCG signal and the ECG signal. The technical solution of the present invention solves the problem in the prior art of requiring a large number of sample pairs of ECG and BCG signals to test the BCG algorithm, resulting in high data collection costs in terms of time and manpower. By generating some pseudo-BCG signals through the BCG signal generation model and adding them to the test samples of the BCG algorithm, the testing cost of the BCG algorithm can be effectively reduced.
[0034] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0036] Figure 1 A flowchart of a BCG algorithm testing method provided by an embodiment of the present invention;
[0037] Figure 2A flowchart of another BCG algorithm testing method provided by an embodiment of the present invention;
[0038] Figure 3 A flowchart of another BCG algorithm testing method provided in an embodiment of the present invention;
[0039] Figure 4 A schematic structural diagram of a BCG algorithm testing device provided in an embodiment of the present invention;
[0040] Figure 5 A schematic diagram of the structure of an electronic device for implementing the BCG algorithm testing method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0041] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0042] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0043] Figure 1 This is a flow chart of a BCG algorithm testing method provided by an embodiment of the present invention. This embodiment is applicable to the case of testing the BCG algorithm. The method can be executed by a BCG algorithm testing device. The device can be implemented in the form of hardware and / or software. The device can be configured in a computer device. Figure 1 As shown, the method specifically includes the following steps:
[0044] S110 , obtaining an electrocardiogram (ECG) signal.
[0045] Specifically, a large amount of ECG signals can be downloaded from a public database or website.
[0046] In an optional implementation, in order to ensure the accuracy of the test, the downloaded ECG signal may be pre-processed, including filtering, denoising, normalization and other operations.
[0047] S120 , inputting the ECG signal into a pre-trained ballistocardiogram (BCG) signal generation model to obtain a pseudo BCG signal output by the BCG signal generation model.
[0048] Among them, the BCG signal generation model can be a pre-trained AI (artificial intelligence) model; the pseudo BCG signal can be a BCG signal generated by the BCG signal generation model. The BCG signal is not a truly collected BCG signal, so it can be called a pseudo BCG signal.
[0049] Specifically, the downloaded ECG signals are sequentially input into a trained BCG signal generation model, and the model can generate corresponding pseudo BCG signals according to the input ECG signals.
[0050] It's also important to note that there's a one-to-one correspondence between the input ECG signal and the generated pseudo BCG signal. For example, if you download a user's ECG signal for the current period and input it into the BCG signal generation model, you can generate a pseudo BCG signal that mimics the user's actual BCG signal for the current period.
[0051] S130 , testing the BCG algorithm based on the pseudo BCG signal and the ECG signal.
[0052] Among them, the BCG algorithm refers to an algorithm that can extract heart rate information from the BCG signal.
[0053] To test the developed BCG algorithm and determine its accuracy, we can first use the BCG algorithm to extract heart rate information from the pseudo BCG signal. At the same time, the heart rate information corresponding to the ECG signal is used as the gold standard.
[0054] Furthermore, the heart rate information corresponding to the ECG signal is compared with the heart rate information extracted from the pseudo BCG signal, and the accuracy of the BCG algorithm is determined based on the comparison result, that is, whether the BCG algorithm can accurately extract the heart rate information from the BCG signal.
[0055] The beneficial effect of this is that some easily accessible ECG signals can be downloaded from the Internet, while BCG signals with higher acquisition costs can be generated through the AIGC (artificial intelligence generated content) method, thereby obtaining a large number of test samples required for BCG algorithm testing, effectively reducing testing costs and providing assistance for subsequent optimization of the BCG algorithm.
[0056] In some embodiments, testing the BCG algorithm based on the pseudo-BCG signal and the ECG signal may include: calculating a first heart rate beat number corresponding to the pseudo-BCG signal based on the pseudo-BCG signal and the BCG algorithm; determining a second heart rate beat number based on the ECG signal, and determining the accuracy of the BCG algorithm test based on the first heart rate beat number and the second heart rate beat number.
[0057] It's understood that ECG signals are highly accurate in measuring heart rate, so the heart rate count corresponding to the ECG signal can be used as the gold standard for pseudo-BCG signals. The first heart rate count refers to the heart rate count extracted from the pseudo-BCG signal using the BCG algorithm; the second heart rate count refers to the heart rate count determined based on the ECG signal.
[0058] Specifically, the developed BCG algorithm can be used to process the generated pseudo-BCG signal to extract heart rate information, such as the heart rate beat count. The heart rate beat count extracted by the BCG algorithm can then be compared with the heart rate beat count of the ECG signal. By comparing the heart rate beat counts calculated from the two signals, the accuracy of the BCG algorithm can be tested.
[0059] In a preferred embodiment, if the heart rate beat count extracted by the BCG algorithm is highly consistent with the heart rate beat count of the ECG signal, then the current BCG algorithm has a high accuracy in measuring heart rate. If there is a deviation, the current BCG algorithm can be optimized based on the comparison results to improve its accuracy.
[0060] The technical solution of an embodiment of the present invention includes acquiring an electrocardiogram (ECG) signal; inputting the ECG signal into a pre-trained ballistocardiogram (BCG) signal generation model to obtain a pseudo-BCG signal output by the BCG signal generation model; and testing a BCG algorithm based on the pseudo-BCG signal and the ECG signal. The technical solution of the present invention solves the problem in the prior art of requiring a large number of sample pairs of ECG and BCG signals to test the BCG algorithm, resulting in high data collection costs in terms of time and manpower. By generating some pseudo-BCG signals through the BCG signal generation model and adding them to the test samples of the BCG algorithm, the testing cost of the BCG algorithm can be effectively reduced.
[0061] Figure 2 This is a flow chart of another BCG algorithm testing method provided by an embodiment of the present invention. Based on the above embodiment, this embodiment can also pre-train the initial signal generation model with a large number of training samples to obtain a BCG signal generation model. Figure 2 As shown, the method specifically includes the following steps:
[0062] S210 : Acquire a sample ECG signal and a sample BCG signal corresponding to the sample ECG signal.
[0063] The sample ECG signal may be a pre-acquired ECG signal, and a BCG signal corresponding to the ECG signal is collected at the same time as the sample BCG signal; both the sample ECG signal and the sample BCG signal are real.
[0064] Specifically, ECG signals can be captured by electrodes attached to the body surface to capture the heart's electrical signals, and BCG signals can be collected based on piezoelectric ceramics.
[0065] S220 : Based on the sample ECG signal and the sample BCG signal, train an initial signal generation model to obtain a BCG signal generation model.
[0066] Among them, the initial signal generation model refers to an untrained AI model. By training the initial signal generation model, a BCG signal generation model can be obtained, and the BCG signal generation model is used to generate a pseudo BCG signal.
[0067] Specifically, the collected sample ECG and BCG signals form a training sample pair to train the initial signal generation model. The sample ECG signal serves as the input to the initial signal generation model, and the sample BCG signal serves as the label. The initial signal generation model then outputs a pseudo BCG signal. Through iterative training of the initial signal generation model, the pseudo BCG signal generated by the initial signal generation model gradually approaches the true signal, that is, the sample BCG signal.
[0068] In some embodiments, training an initial signal generation model based on a sample ECG signal and a sample BCG signal to obtain a BCG signal generation model may include: inputting the sample ECG signal into the initial signal generation model, and the initial signal generation model generates a BCG signal to be used; calculating a loss value based on the BCG signal to be used and the sample BCG signal, and adjusting the network parameters of the initial signal generation model according to the loss value; repeating the process of generating the BCG signal to be used, calculating the loss value, and adjusting the network parameters until a preset iteration stop condition is met, and determining the current initial signal generation model as the BCG signal generation model.
[0069] The "to-be-used BCG signal" refers to the BCG signal predicted by the initial signal generation model based on the input sample ECG signal, i.e., the pseudo BCG signal described above. The "loss value" is a specific value calculated based on the loss function; the loss function is a mathematical function used to quantify the difference between the predicted value of the initial signal generation model and the true value.
[0070] Specifically, the sample ECG signal is input into the initial signal generation model, which then outputs the generated BCG signal, which serves as the intended BCG signal. Furthermore, the intended BCG signal and the actual sample BCG signal are substituted into the loss function to calculate the loss value. Based on the loss value, the model's network parameters, such as weights and biases, are adjusted to make the model's predictions closer to the actual BCG signal.
[0071] The process of generating the BCG signal to be used, calculating the loss value, and adjusting the network parameters can be repeated until a preset stopping condition is met, such as when the loss function converges, a preset maximum number of iterations is reached, or the model's prediction accuracy reaches a preset threshold. At this point, the initial signal generation model from the current training round can be used as the final BCG signal generation model, which can be used to convert ECG signals into pseudo-BCG signals.
[0072] S230: Obtain an electrocardiogram (ECG) signal.
[0073] S240 , inputting the ECG signal into a pre-trained ballistocardiogram (BCG) signal generation model to obtain a pseudo BCG signal output by the BCG signal generation model.
[0074] S250 , testing the BCG algorithm based on the pseudo BCG signal and the ECG signal.
[0075] like Figure 3 FIG2 is a flow chart of another BCG algorithm testing method provided by an embodiment of the present invention. The method is divided into a training phase and an algorithm testing phase, which can reduce the testing cost of the BCG algorithm.
[0076] The technical solution of the embodiment of the present invention includes obtaining a sample ECG signal and a sample BCG signal corresponding to the sample ECG signal; training an initial signal generation model based on the sample ECG signal and the sample BCG signal to obtain a BCG signal generation model; obtaining an electrocardiogram (ECG) signal, inputting the ECG signal into a pre-trained ballistocardiogram (BCG) signal generation model to obtain a pseudo BCG signal output by the BCG signal generation model; and testing the BCG algorithm based on the pseudo BCG signal and the ECG signal. The technical solution of the present invention solves the problem in the prior art that a large number of sample pairs of ECG signals and BCG signals are required to test the BCG algorithm, resulting in high costs such as time and manpower for data collection. By generating some pseudo BCG signals through the BCG signal generation model and adding them to the test samples of the BCG algorithm, the testing cost of the BCG algorithm can be effectively reduced.
[0077] Figure 4 A structural diagram of a BCG algorithm testing device provided by an embodiment of the present invention. Figure 4 As shown, the device includes:
[0078] A signal acquisition module 310 is used to acquire an electrocardiogram (ECG) signal;
[0079] A signal generation module 320 is configured to input the ECG signal into a pre-trained ballistocardiogram (BCG) signal generation model to obtain a pseudo BCG signal output by the BCG signal generation model;
[0080] The algorithm testing module 330 is used to test the BCG algorithm based on the pseudo BCG signal and the ECG signal.
[0081] The technical solution of the embodiment of the present invention includes obtaining a sample ECG signal and a sample BCG signal corresponding to the sample ECG signal; training an initial signal generation model based on the sample ECG signal and the sample BCG signal to obtain a BCG signal generation model; obtaining an electrocardiogram (ECG) signal, inputting the ECG signal into a pre-trained ballistocardiogram (BCG) signal generation model to obtain a pseudo BCG signal output by the BCG signal generation model; and testing the BCG algorithm based on the pseudo BCG signal and the ECG signal. The technical solution of the present invention solves the problem in the prior art that a large number of sample pairs of ECG signals and BCG signals are required to test the BCG algorithm, resulting in high costs such as time and manpower for data collection. By generating some pseudo BCG signals through the BCG signal generation model and adding them to the test samples of the BCG algorithm, the testing cost of the BCG algorithm can be effectively reduced.
[0082] Optionally, the BCG algorithm test device also includes:
[0083] The model training module is used to obtain sample ECG signals and sample BCG signals corresponding to the sample ECG signals; based on the sample ECG signals and sample BCG signals, the initial signal generation model is trained to obtain a BCG signal generation model.
[0084] Optionally, the model training module is specifically used to:
[0085] The sample ECG signal is input into the initial signal generation model, and the initial signal generation model generates a BCG signal to be used;
[0086] Calculate the loss value based on the BCG signal to be used and the sample BCG signal, and adjust the network parameters of the initial signal generation model according to the loss value;
[0087] The process of generating the BCG signal to be used, calculating the loss value, and adjusting the network parameters is repeated until the preset iteration stop condition is met, and the current initial signal generation model is determined as the BCG signal generation model.
[0088] Optionally, the preset iteration stopping condition is: the number of training rounds of the initial signal generation model is greater than the preset training rounds or the accuracy of the initial signal generation model is greater than the preset accuracy.
[0089] Optionally, the algorithm testing module 330 includes:
[0090] A first heart rate beat number calculation submodule, configured to calculate a first heart rate beat number corresponding to the pseudo BCG signal based on the pseudo BCG signal and the BCG algorithm;
[0091] The accuracy determination submodule is configured to determine the second heart rate beat number based on the ECG signal and the accuracy of the BCG algorithm test based on the first heart rate beat number and the second heart rate beat number.
[0092] The BCG algorithm testing device provided in the embodiment of the present invention can execute the BCG algorithm testing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0093] Figure 5 A schematic diagram of the structure of an electronic device for implementing the testing method of the BCG algorithm of an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0094] like Figure 5 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0095] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0096] The processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors that run machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the BCG algorithm testing method.
[0097] In some embodiments, the testing method of the BCG algorithm can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the testing method of the BCG algorithm described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the testing method of the BCG algorithm by any other appropriate means (for example, by means of firmware).
[0098] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0099] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0100] In the context of the present invention, computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage medium can include but is not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage medium can be a machine-readable signal medium. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0101] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0102] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0103] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0104] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0105] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A method for testing a BCG algorithm, characterized in that: include: Obtain electrocardiogram (ECG) signals; Inputting the ECG signal into a pre-trained ballistocardiogram (BCG) signal generation model to obtain a pseudo BCG signal output by the BCG signal generation model; A BCG algorithm is tested based on the pseudo BCG signal and the ECG signal.
2. The method according to claim 1, characterized in that Before acquiring the electrocardiogram (ECG) signal, the method further includes: Acquire a sample ECG signal and a sample BCG signal corresponding to the sample ECG signal; Based on the sample ECG signal and the sample BCG signal, an initial signal generation model is trained to obtain the BCG signal generation model.
3. The method according to claim 2, characterized in that The training of an initial signal generation model based on the sample ECG signal and the sample BCG signal to obtain the BCG signal generation model includes: Inputting the sample ECG signal into the initial signal generation model, the initial signal generation model generates a BCG signal to be used; Calculating a loss value based on the to-be-used BCG signal and the sample BCG signal, and adjusting network parameters of the initial signal generation model according to the loss value; The process of generating the BCG signal to be used, calculating the loss value, and adjusting the network parameters is repeated until a preset iteration stop condition is met, and the current initial signal generation model is determined as the BCG signal generation model.
4. The method according to claim 3, characterized in that The preset iteration stopping condition is: the number of training rounds of the initial signal generation model is greater than the preset training rounds or the accuracy of the initial signal generation model is greater than the preset accuracy.
5. The method according to claim 1, wherein The testing of the BCG algorithm based on the pseudo BCG signal and the ECG signal includes: Calculating a first heart rate beat number corresponding to the pseudo BCG signal based on the pseudo BCG signal and the BCG algorithm; A second heart rate beat number is determined based on the ECG signal, and the accuracy of the BCG algorithm test is determined based on the first heart rate beat number and the second heart rate beat number.
6. A BCG algorithm testing device, characterized in that: include: A signal acquisition module is used to acquire electrocardiogram (ECG) signals; a signal generation module, configured to input the ECG signal into a pre-trained ballistocardiogram (BCG) signal generation model to obtain a pseudo BCG signal output by the BCG signal generation model; An algorithm testing module is used to test the BCG algorithm based on the pseudo BCG signal and the ECG signal.
7. The device according to claim 6, characterized in that Also includes: A model training module, configured to obtain a sample ECG signal and a sample BCG signal corresponding to the sample ECG signal; Based on the sample ECG signal and the sample BCG signal, an initial signal generation model is trained to obtain the BCG signal generation model.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform the BCG algorithm testing method according to any one of claims 1 to 5.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the BCG algorithm testing method according to any one of claims 1 to 5 when executed.
10. A computer program product, characterized in that The computer program product comprises a computer program, which, when executed by a processor, implements the testing method of the BCG algorithm according to any one of claims 1 to 5.